mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-08 08:31:13 +00:00
no message
This commit is contained in:
parent
1dee908167
commit
00ca6f5e0d
@ -6,6 +6,8 @@
|
||||
+ (SQueue *)concurrentDefaultQueue;
|
||||
+ (SQueue *)concurrentBackgroundQueue;
|
||||
|
||||
+ (SQueue *)wrapConcurrentNativeQueue:(dispatch_queue_t)nativeQueue;
|
||||
|
||||
- (void)dispatch:(dispatch_block_t)block;
|
||||
|
||||
- (dispatch_queue_t)_dispatch_queue;
|
||||
|
@ -50,6 +50,11 @@ static const void *SQueueSpecificKey = &SQueueSpecificKey;
|
||||
return queue;
|
||||
}
|
||||
|
||||
+ (SQueue *)wrapConcurrentNativeQueue:(dispatch_queue_t)nativeQueue
|
||||
{
|
||||
return [[SQueue alloc] initWithNativeQueue:nativeQueue queueSpecific:NULL];
|
||||
}
|
||||
|
||||
- (instancetype)init
|
||||
{
|
||||
dispatch_queue_t queue = dispatch_queue_create(NULL, NULL);
|
||||
|
@ -10,15 +10,15 @@
|
||||
{
|
||||
return [[SSignal alloc] initWithGenerator:^id<SDisposable> (SSubscriber *subscriber)
|
||||
{
|
||||
SMetaDisposable *disposable = [[SMetaDisposable alloc] init];
|
||||
SDisposableSet *disposable = [[SDisposableSet alloc] init];
|
||||
|
||||
[disposable setDisposable:[self startWithNext:^(id next)
|
||||
[disposable add:[self startWithNext:^(id next)
|
||||
{
|
||||
[subscriber putNext:next];
|
||||
} error:^(id error)
|
||||
{
|
||||
SSignal *signal = f(error);
|
||||
[disposable setDisposable:[signal startWithNext:^(id next)
|
||||
[disposable add:[signal startWithNext:^(id next)
|
||||
{
|
||||
[subscriber putNext:next];
|
||||
} error:^(id error)
|
||||
|
@ -7,6 +7,7 @@
|
||||
return [[SSignal alloc] initWithGenerator:^id<SDisposable> (SSubscriber *subscriber)
|
||||
{
|
||||
[subscriber putNext:next];
|
||||
[subscriber putCompletion];
|
||||
return nil;
|
||||
}];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user