Skip to content

Instantly share code, notes, and snippets.

@albertodebortoli
Created November 30, 2015 11:59
Show Gist options
  • Save albertodebortoli/dc37a9716efc83e8644e to your computer and use it in GitHub Desktop.
Save albertodebortoli/dc37a9716efc83e8644e to your computer and use it in GitHub Desktop.
Futures & Promises brainstorming
[self job1].continueWith(^{
return [self job2];
}).continueWith(^{
return [self job3];
})
[JEPromise executeWaterfall(^{
return [self job1].[self job2].[self job3];
}).finally(^(JEFuture *fut){
switch (fut.progress) {
case job1: {
break;
}
case job3: {
break;
}
default: break;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment