mirror of
https://github.com/status-im/react-native.git
synced 2025-01-28 18:25:06 +00:00
Synchronize map access
Summary: We want applying deltas to be an atomic operation, from incrementing the delta message ID to updating the relevant maps. This is a simple approach to synchronize the corrsponding method. We will probably need to go with a more sophisticated approach, that makes sure that deltas are applied in order. That would also allow us to lock only on writes. Reviewed By: kathryngray Differential Revision: D6846560 fbshipit-source-id: 175a80b4e39223883e397d75e20109fc12a2a878
This commit is contained in:
parent
00099093dc
commit
e756251413
@ -286,7 +286,7 @@ public class BundleDownloader {
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean storeDeltaInFile(BufferedSource body, File outputFile) throws IOException {
|
||||
private synchronized boolean storeDeltaInFile(BufferedSource body, File outputFile) throws IOException {
|
||||
|
||||
JsonReader jsonReader = new JsonReader(new InputStreamReader(body.inputStream()));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user