On Friday 07 July 2006 11:39, Charles O Nutter wrote: > There does appear to be a bug with how variables accessed in threads are > scoped. It could be a threading issue or it could be a parsing issue; but > the following should print "1": > > a = nil > Thread.new { a = 1 } > p a
You don't know that. It's possible the print statement is executed before the a=1 runs. To be sure, you'd need this: a = nil t= Thread.new { a = 1 } t.join p a Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel