• 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: ObjC Garbage Collector and MIDI Thread
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ObjC Garbage Collector and MIDI Thread


  • Subject: Re: ObjC Garbage Collector and MIDI Thread
  • From: Camille Troillard <email@hidden>
  • Date: Fri, 16 Jul 2010 12:36:47 +0200

Thank you Jeff.  Your second comment is exactly the kind of
information I was searching for.

I have searched a little further and found that making simple function
calls (or objective-c messaging) without waking up the GC was in fast
possible.  That means my MIDI thread now runs without the garbage
collection enabled.

I guess I have the best of both worlds.



On Thu, Jul 15, 2010 at 6:48 PM, Jeff Moore <email@hidden> wrote:
> Garbage Collectors have to block threads in order to collect on them. These blocks are typically short, but there are no guarantees on an upper bound for how long they may delay the thread in question. This is completely anathema to real time operations. The best possible case is that you will have bad timing. The worst case is that you will lose data as deadlines get missed.
>
> Not to mention the fact that your code does not own the threads in question. They can and will die and respawn at the behest of the MIDI system. So, you always run the risk of having a new thread come along and call one of your callbacks in a non-collected thread.
>
> This is why we don't recommend using GC or anything that touches GC'd memory on the various real time contexts.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >ObjC Garbage Collector and MIDI Thread (From: Camille Troillard <email@hidden>)
 >Re: ObjC Garbage Collector and MIDI Thread (From: Jeff Moore <email@hidden>)

  • Prev by Date: RE: Mic hardware flaw on iPhone 4?
  • Next by Date: Core Audio playback precision on iOS devices (and simulator)
  • Previous by thread: Re: ObjC Garbage Collector and MIDI Thread
  • Next by thread: Mic hardware flaw on iPhone 4?
  • Index(es):
    • Date
    • Thread