Re: Threads vs Select (was Re: Re(2): [Repost] OTCountFreeBytes? (like OTCountDataBytes but for send))
Re: Threads vs Select (was Re: Re(2): [Repost] OTCountFreeBytes? (like OTCountDataBytes but for send))
- Subject: Re: Threads vs Select (was Re: Re(2): [Repost] OTCountFreeBytes? (like OTCountDataBytes but for send))
- From: Bryan Christianson <email@hidden>
- Date: Tue, 5 Feb 2002 07:49:03 +1300
At 8:19 AM -0800 2/4/02, Duane Murphy wrote:
How do you break a thread that is waiting on a read? Or rather what
happens when a thread is killed waiting on a read? Or how do you kill a
thread waiting on read?
If you have a thread waiting on a read and the program wants it to stop
in order to quit or because the user cancelled the request, what is the
right way of doing that?
Seems like just killing the thread doesnt properly unwind the stack so
some things might be left un-clean.
What is the right technique for this?
pthread_cancel().
This is probably off topic for this list, but the issues are well
covered in comp.programming.threads with input from people like Dave
Butenhof who (literally) wrote the book on pthreads.
--
Bryan Christianson
email: <
mailto:email@hidden>
Home Page: <
http://crash.ihug.co.nz/~bryanc>