02-18-2016, 12:02 AM
(This post was last modified: 02-18-2016, 12:03 AM by LogicParrot.)
Ok. Let's leave it as is.
Concurrency - Lambda based message passing
|
02-18-2016, 12:02 AM
(This post was last modified: 02-18-2016, 12:03 AM by LogicParrot.)
Ok. Let's leave it as is.
02-19-2016, 08:35 AM
Damn. I'm halfway through such a rewrite :P
02-19-2016, 11:14 AM
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.
02-21-2016, 08:57 PM
Like worktycho said, futures/promises are the way to go for something like this.
https://github.com/progschj/ThreadPool/b...readPool.h is a pretty good example of an async work queue with futures. |
« Next Oldest | Next Newest »
|