I have no expert weigh-in but only a quick google search revealed:

From: http://www.cocoadev.com/index.pl?GarbageCollection

> The big cost is to latency - the ability of a program to respond 
> near-instantaneously to real-time situations. For many programs, this is not 
> an issue - nanosecond latency is simply not needed. Other problem domains 
> cannot use mark-and-sweep for this reason, for example music (eg MIDI) 
> programs. Low latency is impossible because during the mark-and-sweep 
> process, the program cannot respond to external stimulus, so latency cannot 
> be lower than the length of a mark-and-sweep.

Maybe someone is kind enough to correct me.

Regards,
- Rob


On 2011-07-27, at 7:54 PM, Tom Jordan wrote:

> Hi,
> 
>     I'd like to use MacRuby alongside Objective-C in a MIDI app I'm writing.  
> I have already had success with evaluating MacRuby files from the AppDelegate 
> and they work great in tandem with the rest of the code in Objective-C.   I'm 
> just concerned about getting further along with application, and all of a 
> sudden finding out that there are MIDI timing issues that are being adversely 
> affected by the garbage collection.  Right now the MIDI output that the app 
> is generating sounds tight, although the app is simple at this point, and I'm 
> worried that as more objects get allocated, etc.. there may be some timing 
> issues.  If that does happen, will there be a way to fix that using 
> NSThreads?  Or would I need to use pthreads and register them with  
> "objc_registerThreadWithCollector()" ?    The reason I'm asking, is that I've 
> tried to use an open-source MIDI framework that uses pthreads, and it will 
> only work if GC is turned off.  I've tried to call 
> "objc_registerThreadWithCollector()" from that code, but it's still not 
> working.  At this point, I don't need to use the open source MIDI framework 
> since I have MIDI working anyways.. but I'm concerned about timing issues 
> creeping in later..  
> 
> any advice is welcome...  If someone says "Your crazy for trying to write a 
> MIDI application using Garbage Collection", or "Don't worry, Garbage 
> Collection won't be a problem"... that will help immensely.. or something in 
> between if that's the case.. any more knowledge on this subject will be 
> greatly appreciated.. Thanks !
> 
> Cheers,
> 
> Tom Jordan
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel@lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

_______________________________________________
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

Reply via email to