[ios] Test snapshotting on background queue

This commit is contained in:
Minh Nguyễn
2020-03-16 17:58:17 -07:00
committed by Minh Nguyễn
parent 3318a0a383
commit 363610c7df

View File

@@ -104,8 +104,7 @@ MGLMapSnapshotter* snapshotterWithBounds(MGLCoordinateBounds bounds, CGSize size
CLLocationCoordinate2D coord = CLLocationCoordinate2DMake(30.0, 30.0);
// Test triggering to main queue
dispatch_queue_t backgroundQueue = dispatch_get_main_queue();
// dispatch_queue_t backgroundQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
dispatch_queue_t backgroundQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
__weak __typeof__(self) weakself = self;
__block __weak MGLMapSnapshotter *weakSnapshotter;
@@ -154,8 +153,7 @@ MGLMapSnapshotter* snapshotterWithBounds(MGLCoordinateBounds bounds, CGSize size
CLLocationCoordinate2D coord = CLLocationCoordinate2DMake(30.0, 30.0);
// Test triggering to main queue
dispatch_queue_t backgroundQueue = dispatch_get_main_queue();
// dispatch_queue_t backgroundQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
dispatch_queue_t backgroundQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
__weak __typeof__(self) weakself = self;