mirror of
https://github.com/easychen/pushdeer.git
synced 2024-09-09 22:38:16 +08:00
11 lines
295 B
Objective-C
11 lines
295 B
Objective-C
#import "AnyPromise.h"
|
|
@import Dispatch;
|
|
|
|
AnyPromise *dispatch_promise_on(dispatch_queue_t queue, id block) {
|
|
return [AnyPromise promiseWithValue:nil].thenOn(queue, block);
|
|
}
|
|
|
|
AnyPromise *dispatch_promise(id block) {
|
|
return dispatch_promise_on(dispatch_get_global_queue(0, 0), block);
|
|
}
|