Mail Archives: cygwin-developers/2002/08/05/11:36:40
On Mon, Aug 05, 2002 at 05:22:50PM +0200, Corinna Vinschen wrote:
>On Mon, Aug 05, 2002 at 11:05:53AM -0400, Chris Faylor wrote:
>> On Mon, Aug 05, 2002 at 03:06:00PM +0200, Corinna Vinschen wrote:
>> >cygthread::exit_thread() calls ExitThread(0). The thread which calls
>> >exit_thread() - fhandler_tty.cc, process_output() - is a cygthread
>> >function, too. Shouldn't exit_thread() actually call SuspendThread(0)
>> >instead?
>>
>> Not if it truly wanted the thread to exit, no. Suspending the thread
>> when it is going away anyway didn't seem like a good idea to me.
>
>Hmm, since the calling thread is a cygthread, it means that after calling
>exit_thread() there's a thread slot with no actual stub routine running.
>That doesn't sound like a good idea, too, somehow.
It's not going to be reused, though. This should only be called in a
process exiting condition when the thread is exiting prior to the
process exiting. It seemed slightly more efficient to just exit the
thread in this case.
cgf
- Raw text -