Skip to content

Commit

Permalink
use dispatch_get_main_queue on ios
Browse files Browse the repository at this point in the history
  • Loading branch information
ammarahm-ed committed Jul 1, 2020
1 parent a6bf5c6 commit 31ad39e
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions ios/MMKVStorage.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,7 @@ @implementation MMKVStorage

const int DATA_TYPE_ARRAY = 5;

static dispatch_queue_t RCTGetMethodQueue()
{
static dispatch_queue_t queue;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
queue = dispatch_queue_create("MMKVStorage.Queue", DISPATCH_QUEUE_SERIAL);
});
return queue;
}


MMKV *mmkv;
SecureStorage *secureStorage;
Expand All @@ -38,7 +30,7 @@ static dispatch_queue_t RCTGetMethodQueue()

- (dispatch_queue_t)methodQueue
{
return RCTGetMethodQueue();
return dispatch_get_main_queue();
}

- (id)init
Expand Down

0 comments on commit 31ad39e

Please sign in to comment.