NSURLSession rewrite (#422)

* clang-format: Do not use tabs

* Ignore clangd cache and compile_commands

* NSBlockOperation: Fix memory leak

* NSHTTPCookie: Fix expires date parsing

* NSHTTPCookie: Release DateFormatter after use

* NSOperation: Remove all objects at end of execution

* Reimplementation of NSURLSession

* NSURLSession: Update expiration dates in test

* Update ChangeLog

* Fix trivial compiler warning caused by missing import

* Import GSDispatch.h for definition of DISPATCH_QUEUE_SERIAL

* Import common.h early to avoid header conflict

* Fix import order to avoid conflicts and ensure we have correct localisation macro

* Check for presence of dispatch_cancel

* Cancel timer using dispatch_source_cancel() if dispatch_cancel() is missing.

* NSURLSession: Replace dispatch_io with dispatch_source in unit test HTTP server

---------

Co-authored-by: hmelder <service@hugomelder.com>
This commit is contained in:
rfm 2024-08-16 13:08:41 +01:00 committed by GitHub
parent 9b92c2d593
commit ed4e305026
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
53 changed files with 5410 additions and 7178 deletions

View file

@ -593,13 +593,15 @@ static NSArray *empty = nil;
- (void) main
{
NSEnumerator *en = [[self executionBlocks] objectEnumerator];
NSEnumerator *en = [_executionBlocks objectEnumerator];
GSBlockOperationBlock theBlock;
while ((theBlock = (GSBlockOperationBlock)[en nextObject]) != NULL)
{
CALL_NON_NULL_BLOCK_NO_ARGS(theBlock);
}
[_executionBlocks removeAllObjects];
}
@end