execution_monitor and threads

Hi, Is there any defined behavior of the execution_monitor if the controlled function starts new threads? Does every thread need its own monitor or is one for the main thread from where the others are started sufficient? Thanks in advance, Raymond

Hi,
Is there any defined behavior of the execution_monitor if the controlled function starts new threads? Does every thread need its own monitor or is one for the main thread from where the others are started sufficient?
Thanks in advance,
Raymond
Hi, Raymond Sorry for delay in reply. My understanding is that you are trying to use boost::execution_monitor - part of Boost.Test library. Unfortunately this component is not thread safe. I've made sure that it reentrant safe. But to access it from multiple threads require adding guards for static data and/or use of TLS. I did not have time to do this and frankly this is not in my immediate to do list. There are some non trivial issues to consider. So you only options is single monitor in main thread. And even in this case I am not sure if it will work. Especially in regards of exceptions and signals handling. You probably will need to go extra mile to get what you want. Regards, Gennadiy
participants (2)
-
Gennadiy Rozental
-
Raymond Haeb