Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Parse/Internal/LocalDataStore/SQLite/PFSQLiteDatabase.m
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,13 @@ - (instancetype)initWithPath:(NSString *)path {
_databaseClosedTaskCompletionSource = [[BFTaskCompletionSource alloc] init];
_databasePath = [path copy];

_databaseQueue = PFThreadsafetyCreateQueueForObject(self);
dispatch_queue_t queue = PFThreadsafetyCreateQueueForObject(self);
_databaseQueue = queue;
_databaseExecutor = [BFExecutor executorWithBlock:^(dispatch_block_t block) {
// Execute asynchrounously on the proper queue.
// Seems a bit backwards, but we don't have PFThreadsafetySafeDispatchAsync.
dispatch_async(dispatch_get_global_queue(0, 0), ^{
PFThreadsafetySafeDispatchSync(_databaseQueue, block);
PFThreadsafetySafeDispatchSync(queue, block);
});
}];

Expand Down