22 Apr
2009
22 Apr
'09
8:19 a.m.
I see that I'm way behind the times on boost::thread - I hadn't realized that cancellation had been added to it.
Could you please point out where you found "cancellation" in boost.thread docs? Or probably you mean "interruption"?
So, I'll rephrase the question - from the point of view of boost::statechart, is there a reason to prefer cancellation over some other means of stopping a thread, like calling a stop() function and then join()?
When you "cancel" or stop another thread by any means and then join() it from within the thread that processes state-chart events, the state-machine would not process events until join() returns. Whether this is the desired behavior or not - depends on the design of your application.