• 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: Accessing user interface from ioProc
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Accessing user interface from ioProc


  • Subject: Re: Accessing user interface from ioProc
  • From: James McCartney <email@hidden>
  • Date: Fri, 21 Nov 2003 15:48:28 -0800

On Nov 20, 2003, at 12:05 AM, Michael Thornburgh wrote:

from your IOProc, you can queue up something to happen in the main thread to actually do your UI updating, see -[NSObject performSelectorOnMainThread:withObject:waitUntilDone:] for more information (and you _don't_ want to waitUntilDone, of course!).

I'm not an expert on the Cocoa side so I am just guessing, but I would question whether this is safe in the ioProc. In order to send this selector to the main thread, it is probably putting something on a message queue and that queue is probably protected with a lock. Taking a lock in the ioProc is not good.

When I want to do some messaging from the ioProc I use a lock free FIFO, or a pthread_cond_signal() or a combination of both.

James McCartney email@hidden
Apple CoreAudio
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Accessing user interface from ioProc
      • From: Michael Bonnice <email@hidden>
References: 
 >Accessing user interface from ioProc (From: Michael Bonnice <email@hidden>)
 >Re: Accessing user interface from ioProc (From: Michael Thornburgh <email@hidden>)

  • Prev by Date: Re: Apple's _DLSSynth and status= 0xB0 with data1 = 91 to 95
  • Next by Date: Re: Accessing user interface from ioProc
  • Previous by thread: Re: Accessing user interface from ioProc
  • Next by thread: Re: Accessing user interface from ioProc
  • Index(es):
    • Date
    • Thread