ObjC-CollapsingFutures
ObjC-CollapsingFutures copied to clipboard
Futures, for Objective-C, that automatically collapse so it's nearly impossible to mix up the level of future nesting despite the lack of generics.
The following code often crashes on Signal. ``` ObjC TOCFutureSource* futureResultSource = [TOCFutureSource futureSourceUntil:untilCancelledToken]; PacketHandlerBlock packetHandler = ^(id packet) { if (![futureResultSource trySetResult:packet]) {; errorHandler([IgnoredPacketFailure new:@"Received another packet before relay...
Currently, removing a callback can involve searching for it in an array. By using a doubly-linked list, or maybe just a hash table, the worst-case or at least expected times...
One thing that would make the library significantly more useful is if it had pre-made wrappers for asynchronous methods in the framework (e.g. getting address books, creating a network connection,...
One common use case for cancel tokens is "throw away all the old stuff, we have new orders". For example, when a browser browses to a new page it discards...
The doc comment on orderedByCompletionUnless incorrectly says that the resulting future is cancelled if the given token is cancelled. The result isn't even a future. The actual behavior is that...
When a future given to thenAll or finallyAll becomes immortal, the resulting future should also become immortal. When a future given to orderedByCompletion becomes immortal, later entries in the array...
It might be possible to make strange things happen by racing the completion of two futures, where one is set to be the result of the other. Basically: - The...
@mxcl [has noted](https://github.com/mxcl/PromiseKit) that the documentation of what's in the library is not very good. (No, header files don't count.) I've added a method breakdown and design philosophy to the...