Reputation: 65961
Can you use the boost::mutex libraries to protect a critical section of code when you are not using boost::thread but instead using the MFC threading capability via AfxBeginThread? If so, are there any problems with doing this?
Upvotes: 4
Views: 663
Reputation: 8268
A (real) thread is a (real) thread.
Boost makes no special assumptions about the fact that a thread has been created directly (Windows API) or via Boost.
Short answer:
No problem.
Upvotes: 1
Reputation: 1504
Yes, you can. There is no problem since both are using the Win32 API behind the scenes.
Upvotes: 0