Re: pthread mutex question
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