implementing future::then() equivalent for asynchronous execution in c++11

The problem with this approach to .then() is that you spawn 2 threads (that is costly) simultaneously, and second of them would block on its future.get/wait (if the first one would run long enough, of course)
So, its better to use the work queue, to serialize the jobs execution order (and re-cycle the existing threads).
Just look for a good Thread pool pattern implementation

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)