• 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: pthread mutex question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pthread mutex question


  • Subject: Re: pthread mutex question
  • From: Steve Checkoway <email@hidden>
  • Date: Mon, 24 Apr 2006 02:18:31 -0700


On Apr 23, 2006, at 11:59 PM, Stephen Kay wrote:

If I create a pthread mutex within the context of one thread, and then lock
it from some other thread, am I locking the thread it was created on, or the
thread I'm calling it from? I assume the former, but I just want to make
sure.

This is probably not the correct place to ask about pthreads. However, you're not locking a thread, you're locking a mutex. Only one thread can "own" the lock on the mutex at any given time. If thread B tries to lock a mutex that has been locked by thread A, then thread B will block until thread A unlocks the mutex.


- Steve

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >pthread mutex question (From: Stephen Kay <email@hidden>)

  • Prev by Date: Re: Threading/timer issues on Mach-O vs. OS 9
  • Next by Date: Re: Threading/timer issues on Mach-O vs. OS 9
  • Previous by thread: pthread mutex question
  • Next by thread: Re: Coreaudio-api Digest, Vol 3, Issue 127
  • Index(es):
    • Date
    • Thread