阅读背景:

正确的方法来捕获boost线程中断和退出线程

来源:互联网 

I have the code below which is the start of a new thread. BeginWork function goes through a sequence of functions that have heavy exception handling. If threadgroup.interrupt_all(); is called the individual function will handle the interrupt and this causes the thread to remain in it's loop without being interrupted properly. How can I change my error handling to account for this type of exception and mimic the behavior as if the outer try catch block of the intial loop caught the thread interrupt exception? I'm thinking maybe catch the exception of time interupt and set a boolean to true which is checked within the main loop and break if it is set to true.I have the code below which is the start of a n




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: