I have a plugin that's supposed to call into MacRuby to deliver stock prices. This may happen a few times per second. I will be running other MacRuby code at the same time. Think a trading systems development environment, with charting, Ruby code editing, etc. Will MacRuby be able to handle this situation? Thanks, Joel --- http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont
Hi Joel, Yes, MacRuby is fully re-entrant and multi-threaded. The GC also runs on its own threads and will allocate/collect memory from them. There shouldn't be any problem, assuming you are careful not trying to run into the same object from different threads. Unlike the traditional Ruby implementation, there is no global lock to prevent race conditions. If you run into a problem, let us know :) Laurent On Jan 6, 2011, at 12:10 PM, Joel Reymont wrote:
I have a plugin that's supposed to call into MacRuby to deliver stock prices. This may happen a few times per second.
I will be running other MacRuby code at the same time. Think a trading systems development environment, with charting, Ruby code editing, etc.
Will MacRuby be able to handle this situation?
Thanks, Joel
--- http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
On Jan 6, 2011, at 2:48 PM, Laurent Sansonetti wrote:
Yes, MacRuby is fully re-entrant and multi-threaded. The GC also runs on its own threads and will allocate/collect memory from them. There shouldn't be any problem, assuming you are careful not trying to run into the same object from different threads. Unlike the traditional Ruby implementation, there is no global lock to prevent race conditions.
... and, of course, since MacRuby supports GCD, the appropriate thing to do is simply tie each potentially contended object to its own GCD queue and use the async setter / sync getter pattern to make sure that everything works the way you expect! - Jordan
participants (3)
-
Joel Reymont
-
Jordan K. Hubbard
-
Laurent Sansonetti