[Ironruby-core] Code Review: Thread.critical

Shri Borde Shri.Borde at microsoft.com
Mon Jan 5 13:18:17 EST 2009

  tfpt review "/shelveset:critical;REDMOND\sborde"


  Fix to interpreter to get better stack trace even when call-site caching kicks in. The try-catch needs to be added to all code that can throw an exception in the interpreter (or preferably in one function like Interpreter.Interpret), but I have not done that here.


  Implements Thread.critical= by using Monitor.Enter/Exit. This will work for 90% or more of scenarios IMO. MRI does not schedule other threads while Thread.critical is true (while IronRuby will), but this is more an implementation detail that falls out with the green threads scheduler, than something that should be by spec. In fact, other threads do get scheduled anyway if the critical thread does Thread.pass etc (added tests to show this behavior if you want to play with it).
  Added tests
  Added irtests.bat to run all IronRuby tests with a single command, in four processes

-------------- next part --------------
A non-text attachment was scrubbed...
Name: critical.diff
Type: application/octet-stream
Size: 3002 bytes
Desc: critical.diff
URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090105/c2f8acd4/attachment-0001.obj>

More information about the Ironruby-core mailing list