Skip to content
This repository has been archived by the owner on Feb 29, 2020. It is now read-only.

Commit

Permalink
Fix potential race conditions while adding items to sync table
Browse files Browse the repository at this point in the history
- The write operation dispatch queue is defined as concurrent, however,
the tasks that run in it are not thread safe.
- Changing dispatch queue type from concurrent to serial will take care
of it
- In the future, if needed, we can change it back to concurrent and
make the tasks that run in it thread safe.
  • Loading branch information
shrishrirang committed May 20, 2015
1 parent 7e7a587 commit 15581be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sdk/iOS/src/MSSyncContext.m
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ -(id) initWithDelegate:(id<MSSyncContextDelegate>) delegate dataSource:(id<MSSyn
self = [super init];
if (self)
{
writeOperationQueue = dispatch_queue_create("WriteOperationQueue", DISPATCH_QUEUE_CONCURRENT);
writeOperationQueue = dispatch_queue_create("WriteOperationQueue", DISPATCH_QUEUE_SERIAL);

callbackQueue_ = callbackQueue;
if (!callbackQueue_) {
Expand Down

0 comments on commit 15581be

Please sign in to comment.