What does boost::thread do if it fails to create the thread?
The winAPI returns a NULL (I guess posix does something similar) but as thread is an object how do I test to see if the thread was created?
According to the API, it throws a boost::thread_resource_error if the thread creation fails.
I guess you cannot create an invalid boost::thread object: if something goes wrong, the constructor throws thus preventing the object creation.
Throws: boost::thread_resource_error if an error occurs
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With