You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that boost::thread destroys its functor only when join is called. std::thread destroys its functor immediately after the functor returns. Is there a reason for this discrepancy?
Using RAII patterns this can lead to surprising deadlocks...
It seems that
boost::thread
destroys its functor only when join is called.std::thread
destroys its functor immediately after the functor returns. Is there a reason for this discrepancy?Using RAII patterns this can lead to surprising deadlocks...
Example code:
Output:
Wandbox
The text was updated successfully, but these errors were encountered: