Concurrency - Lambda based message passing - Printable Version +- Cuberite Forum (https://forum.cuberite.org) +-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html) +--- Forum: Development (https://forum.cuberite.org/forum-13.html) +--- Thread: Concurrency - Lambda based message passing (/thread-2376.html) Pages:
1
2
|
RE: Concurrency - Lambda based message passing - LogicParrot - 02-18-2016 Ok. Let's leave it as is. RE: Concurrency - Lambda based message passing - tigerw - 02-19-2016 Damn. I'm halfway through such a rewrite :P RE: Concurrency - Lambda based message passing - worktycho - 02-19-2016 This seems like your halfway to an async/await style system. The multithread callbacks have a lot of issues with nesting if you use lambdas not promises, and captures will cause problems regardless. RE: Concurrency - Lambda based message passing - Woazboat - 02-21-2016 Like worktycho said, futures/promises are the way to go for something like this. https://github.com/progschj/ThreadPool/blob/master/ThreadPool.h is a pretty good example of an async work queue with futures. |