Boost logo

Boost Users :

Subject: Re: [Boost-users] at_thread_exit() never getting called
From: cowwoc (cowwoc_at_[hidden])
Date: 2009-11-06 23:31:22


Peter Dimov-5 wrote:
>
> The at_thread_exit hooks are invoked in the context of the thread. When
> exit
> is called, the threads are executing something, and it is not possible to
> make them stop whatever they are doing in order to execute the
> at_thread_exit hooks (and it would be a bad idea were it possible, because
> the thread state could be inconsistent and cause a crash in the hook.)
>

Peter,

Are you saying that if I register shutdown hooks for threads 1, 2 and 3 and
invoke exit() from thread 3 the current behavior of at_thread_exit() would
cause the shutdown hooks to all get invoked by thread 3 while thread 1 and 2
are still executing?

Thanks,
Gili

-- 
View this message in context: http://old.nabble.com/at_thread_exit%28%29-never-getting-called-tp26053513p26235469.html
Sent from the Boost - Users mailing list archive at Nabble.com.

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