Revert "NSURLSession Reimplementation (#411)"

This reverts commit 07233534e6.
This commit is contained in:
rfm 2024-07-02 19:19:14 +01:00 committed by GitHub
parent 07233534e6
commit 3fedf31c2d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
50 changed files with 7197 additions and 5391 deletions

30
Source/GSTaskRegistry.h Normal file
View file

@ -0,0 +1,30 @@
#ifndef INCLUDED_GSTASKREGISTRY_H
#define INCLUDED_GSTASKREGISTRY_H
#import "common.h"
@class NSArray;
@class NSURLSessionTask;
/*
* This helper class keeps track of all tasks.
*
* Each `NSURLSession` has a `GSTaskRegistry` for its running tasks.
*
* - Note: This must **only** be accessed on the owning session's work queue.
*/
@interface GSTaskRegistry : NSObject
- (void ) addTask: (NSURLSessionTask*)task;
- (void) removeTask: (NSURLSessionTask*)task;
- (void) notifyOnTasksCompletion: (void (^)(void))tasksCompletion;
- (NSArray*) allTasks;
- (BOOL) isEmpty;
@end
#endif