[Ironruby-core] Code Review: WEBrick

Tomas Matousek Tomas.Matousek at microsoft.com
Mon May 26 13:02:01 EDT 2008


We need to run multiple isolated IronRuby engines in the same app-domain. Entire state that the runtime and libraries need should be per RubyExecutionContext, which can be retrieved by calling RubyUtils.GetExecutionContext(CodeContext) in library methods. Currently you need to create e.g. a hash from RubyExecutionContext -> data that would be thread safe and static. We'll probably make it easier for libraries and will provide a hash on RubyExecutionContext where you can put stuff.

You don't need to change it now, you can wait for the hash to be available. Correct functionality of the socket library and tests are more important now.

Tomas

-----Original Message-----
From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin
Sent: Monday, May 26, 2008 2:54 AM
To: ironruby-core at rubyforge.org
Subject: Re: [Ironruby-core] Code Review: WEBrick

Hi Tomas,

I noticed in the diff for BasicSocket.cs that you added a TODO comment,
saying that static variables cannot be used (the variable in question was:
private static bool _doNotReverseLookup;).

I had wondered about this and was not sure how to handle it.  Should I have
registered a singleton variable instead?  What is actually the problem with
using a static value?  Is it that the sharing of singleton variables has
different thread semantics to .NET static variables?

Cheers,
Pete

_______________________________________________
Ironruby-core mailing list
Ironruby-core at rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core


More information about the Ironruby-core mailing list