Boost logo

Boost Users :

Subject: Re: [Boost-users] [statechart] Question about do activities
From: Igor R (boost.lists_at_[hidden])
Date: 2009-04-22 04:19:42


> 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.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net