2 votes
closed
tracking: Shell stdlib

Description

 
Uses Thread.exclusive, which is defined in the thread standard library (as opposed to the Thread builtin class), which needs to be ported.

File Attachments


No files are attached


Closed Dec 18 2009 at 10:07 PM  by jredville

manual tests pass. need to work on specs


Comments

most recent at top (show oldest at top)
sborde wrote Oct 20 2009 at 10:49 PM
The Ruby implementation in the previous comment is not safe and assumes green threading. With native threads in IronRuby, if there is a context-switch after the statement "old_critical = Thread.critical", the method can misbehave. This might need an implementation in C# or might need some different technique.

jarnaldich wrote Oct 7 2009 at 9:07 AM
This issue also breaks the distributed ruby library.
For me it was enough to add this before my code:

class Thread
def self.exclusive
old_critical = Thread.critical
Thread.critical=true
return yield
ensure
Thread.critical=old_critical
end
end

It's the same code that the standard ruby library uses...

Greets,

Joan.

jimmysch wrote Jun 10 2009 at 11:32 PM
Missing implementation for this, but it should be in the standard library as Ruby code: http://rails.noobkit.com/show/ruby/ruby/standard-library/thread/exclusive.html.

Need to get this in, as well as other stdlibs that have Ruby code that isn't included.

Updating...
© 2006-2010 Microsoft | About CodePlex | Privacy Statement | Terms of Use | Code of Conduct | Advertise With Us | Version 2010.1.12.16187