Promise
Undocumented
-
Undocumented
-
Undocumented
-
Undocumented
-
Undocumented
-
Undocumented
-
Undocumented
-
Undocumented
-
Undocumented
-
Undocumented
-
Undocumented
-
Undocumented
-
Undocumented
-
Undocumented
-
Undocumented
-
Undocumented
-
Undocumented
-
Undocumented
-
Undocumented
-
Undocumented
-
completes the Future using the supplied completionBlock.
the completionBlock will ONLY be executed if the future is successfully completed.
If the future/promise has already been completed than the block will not be executed.
if you need to know if the completion was successful, use ‘completeWithBlocks()’
Declaration
Swift
public final func completeWithBlock(completionBlock : () throws ->Completion<T>)
Parameters
completionBlock
a block that will run iff the future has not yet been completed. It must return a completion value for the promise.
-
completes the Future using the supplied completionBlock.
the completionBlock will ONLY be executed if the future has not yet been completed prior to this call.
the onAlreadyCompleted will ONLY be executed if the future was already been completed prior to this call.
These blocks may end up running inside any potential thread or queue, so avoid using external/shared memory.
Declaration
Swift
public final func completeWithBlocks(completionBlock : () throws ->Completion<T>, onAlreadyCompleted : () -> Void)
Parameters
completionBlock
a block that will run iff the future has not yet been completed. It must return a completion value for the promise.
onAlreadyCompleted
a block that will run iff the future has already been completed.
-
Undocumented
-
Undocumented
-
Undocumented
-
Undocumented
-
Undocumented