Concurrency - Lambda based message passing
#11
Ok. Let's leave it as is.
Reply
Thanks given by:
#12
Damn. I'm halfway through such a rewrite :P
Reply
Thanks given by:
#13
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.
Reply
Thanks given by:
#14
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.
Reply
Thanks given by:




Users browsing this thread: 2 Guest(s)