• 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: Property notification questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Property notification questions


  • Subject: Re: Property notification questions
  • From: Chris Reed <email@hidden>
  • Date: Wed, 12 Feb 2003 18:29:59 -0600

On Wednesday, Feb 12, 2003, at 16:19 US/Central, Kurt Revis wrote:

On Wednesday, February 12, 2003, at 12:36 PM, Chris Reed wrote:

Like I said, this all works fine. But it seems too complicated.

It seems as though you could skip a step: go directly from the ioproc thread to the main thread. Here's a rough outline:

[snip]

I think this will work, but I haven't actually tried it yet, so be warned :)

Interesting. The reason I hadn't gone directly to the main run loop is that I didn't know that signalling Mach ports was nonblocking. So I created my own thread where I use Mach semaphores.

Hopefully I can implement this soon. I'll let you know how it works out.


The only other way I know to wake up another thread, without potentially blocking, is to use a Mach semaphore. But the sleeping thread needs to specifically wait on the semaphore, so that precludes using a run loop in that thread. The above technique lets you wake up the thread without blocking *and* still use a run loop.

I'm currently using mach semaphores to wake up the notification thread every time an item is put in the queue.

Thanks
-chris
_______________________________________________
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: Property notification questions
      • From: Kurt Revis <email@hidden>
References: 
 >Re: Property notification questions (From: Kurt Revis <email@hidden>)

  • Prev by Date: Re: How are AU User Presets handled?
  • Next by Date: Re: Property notification questions
  • Previous by thread: Re: Property notification questions
  • Next by thread: Re: Property notification questions
  • Index(es):
    • Date
    • Thread