lmj / lparallel

Parallelism for Common Lisp
http://lparallel.org
BSD 3-Clause "New" or "Revised" License
242 stars 29 forks source link

blackbird style attach function for promises #30

Open sirherrbatka opened 7 years ago

sirherrbatka commented 7 years ago

So, blackbird has very useful (though uncommon) feature called attach: http://orthecreedence.github.io/blackbird/#attach It is nice because it bridges two distinctive approaches into one api, so we can write code like this:

handling event in the event loop launching asynchronus task with lparallel, future is returned, we can't block event loop so we are just attaching closure that will post response back to the event loop handling response on the event loop

without creating annoyence for simpler use cases