• 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: Threading synchronization: does a primitive exists?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Threading synchronization: does a primitive exists?


  • Subject: Re: Threading synchronization: does a primitive exists?
  • From: eveningnick eveningnick <email@hidden>
  • Date: Thu, 05 May 2011 16:51:05 +0300

2011/5/5 Heath Borders <email@hidden>:
> Try NSConditionLock. Its documentation should be pretty self-explanatory.
>

Health,
thanks for the response.
However, i can't see how can i use NSConditionLock in my situation.
For every lock (or mutex/semaphore - which essentially is the same) i
need to acquire it 1 time at least to stop the the thread when a
second attempt to acquire it from a different thread is made.
What i need - is to stop the thread A immediately after the thread B
has been spawned by a thread A. I am afraid if i acquire the lock from
A, and then acquire it as soon as B starts (in B routine), the thread
A may even finish before the thread B _actually_ starts (or rather B's
threadfunction starts executing).
Am i wrong somewhere here?
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Threading synchronization: does a primitive exists?
      • From: Graham Cox <email@hidden>
    • Re: Threading synchronization: does a primitive exists?
      • From: Ken Thomases <email@hidden>
References: 
 >Threading synchronization: does a primitive exists? (From: eveningnick eveningnick <email@hidden>)
 >Re: Threading synchronization: does a primitive exists? (From: Heath Borders <email@hidden>)

  • Prev by Date: Re: Threading synchronization: does a primitive exists?
  • Next by Date: Re: Threading synchronization: does a primitive exists?
  • Previous by thread: Re: Threading synchronization: does a primitive exists?
  • Next by thread: Re: Threading synchronization: does a primitive exists?
  • Index(es):
    • Date
    • Thread