I came across some C ++ code, for example:
aThread->async( [=]() { // ... do stuff ... } ).wait();
What is the point of running code in a thread if all you do is wait for completion? Why not replace the above code:
// ... do stuff ...
Yes I agree. Creating a thread and then only waiting for the thread to finish is very small.
It is possible that aThread has its own resources necessary to do the work, and you cannot use them or create them in the caller's thread.