[Ironruby-core] Code Review: Thread#raise

Shri Borde Shri.Borde at microsoft.com
Mon Dec 29 18:00:21 EST 2008

  tfpt review "/shelveset:raise;REDMOND\sborde"
  Comment  :
  Implements Thread#raise using Thread.Abort, and added tests for it
  Implemented stress mode (RubyOptions.UseThreadAbortForSyncRaise) which found more issues. Fixed most but not all
  Enabled test for timeout as well
  Remaining work (not high pri for now)
   - Thread#raise without Exception parameters is not supported as it needs to access the active exception of the target thread. This is stored as a thread-local static, and so cannot be accessed from other threads. Can be fixed by not using ThreadStaticAttribute.
   - Adding probes (in generated code, in C# library code, etc) will help to raise the exception quicker as Thread.Abort can be delayed indefinitely. Ideally, we need both approaches. For now, using Thread.Abort goes a long way.
   - Ideally, we would add a try-catch to the IDynamicObject/MetaObject code paths so that when other languages called into Ruby code, they would get the expected user exception rather than a ThreadAbortException

  RunRSpec: supports -ruby to run with MRI. Its much faster than doing "rake ruby why_regression". Added support for -e to run a specific example

-------------- next part --------------
A non-text attachment was scrubbed...
Name: raise.diff
Type: application/octet-stream
Size: 34302 bytes
Desc: raise.diff
URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20081229/1f453997/attachment-0001.obj>

More information about the Ironruby-core mailing list