• 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: experts : is performSelectorOnMainThread blocking ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: experts : is performSelectorOnMainThread blocking ?


  • Subject: Re: experts : is performSelectorOnMainThread blocking ?
  • From: Chris Kane <email@hidden>
  • Date: Thu, 5 Dec 2002 11:26:23 -0800

That method may block waiting for one or more mutexes trying to get at the job queue, so, approximately, it will be as usable in a potential priority inversion situation as the mutexes. But I don't know anything about the current state of pthread mutexes and the kernel and priority inversion. The mutexes may also be spin-lock type mutexes, which in the situations they occur in the system -- that I know about -- either force the acquiring thread asleep briefly or depress its priority, when necessary, to allow a holding thread to proceed, until the lock is available.

[Of course as well, your app needs to have been made properly Cocoa thread-safe previously in order to be able to use ObjC/Cocoa from the CoreAudio thread, to safely send this message.]

Chris Kane
Cocoa Frameworks, Apple


On Saturday, November 16, 2002, at 04:15 AM, Benjamin Golinvaux wrote:

Hi

i would like to know if performSelectorOnMainThread:withObject:waitUntilDone:
is a potentially blocking call, because i'd like to call it from a real-time (CoreAudio
ioproc) thread and i want to avoid priority inversion. (I am passing NO for the "wait"
parameter).

(if probably posts something somewhere in a queue, and i'd like to now if this
queue supports non-blocking message posting, even in the worst case).

Thanks


Benjamin Golinvaux
Arboretum Systems, Inc.
www.arboretum.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: What is NSCachedWhiteColor?
  • Next by Date: Re: replacing self in initWithCoder method?
  • Previous by thread: What is NSCachedWhiteColor?
  • Next by thread: runtime error using NSArray with NSButton
  • Index(es):
    • Date
    • Thread