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

Threading synchronization: does a primitive exists?


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

Hello
I have a thread A that spawns a thread B, and should stop, waiting
before the thread B allows thread A to continue.

In Windows, in a thread A, before spawning a thread B, i would create
a synchronization "Event" primitive in the "non signaled" mode, the
spawn a thread B, and call WaitForSingleObject(), waiting for thread B
to switch the "Event" into the "signaled" mode, which would release
the WaitForSingleObject() and allow the thread A to continue to
operate.

(WaitForSingleObject() freezes the thread, until the object that it is
waiting for - e.g., an "Event" primitive - is switched into a
"signaled" mode).

In OS X i have no idea how to do that :S I guess it is impossible to
do the same job using mutexes? Maybe some other primitives exist?

I need this _only_ for debugging, it would greatly simplify my life. I
am well aware that this is approach is deadlock-prone.

Thanks for the response if i get one
_______________________________________________

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: Heath Borders <email@hidden>
  • Prev by Date: Re: update a tableView from a different class
  • Next by Date: Re: Threading synchronization: does a primitive exists?
  • Previous by thread: Re: update a tableView from a different class
  • Next by thread: Re: Threading synchronization: does a primitive exists?
  • Index(es):
    • Date
    • Thread