• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Threads vs Select (was Re: Re(2): [Repost] OTCountFreeBytes? (like OTCountDataBytes but for send))
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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>


  • Follow-Ups:
    • Re: Threads vs Select (was Re: Re(2): [Repost] OTCountFreeBytes? (like OTCountDataBytes but for send))
      • From: Quinn <email@hidden>
  • Prev by Date: Recommended API for two-way transfers
  • Next by Date: Re: Network Programming Models (was OTCountFreeBytes?)
  • Previous by thread: Re: Is Open Transport Dying?
  • Next by thread: Re: Threads vs Select (was Re: Re(2): [Repost] OTCountFreeBytes? (like OTCountDataBytes but for send))
  • Index(es):
    • Date
    • Thread