summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorseki <seki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-02-13 15:44:36 +0000
committerseki <seki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-02-13 15:44:36 +0000
commitc2d87245777c92065083aba0bbf74aafc780f5fb (patch)
treed8e3ae64b3871778cdeae3b128ccc5b08c0f5f9a /lib
parent8d420b86883e16d966de178534a0082a1c821704 (diff)
downloadruby-c2d87245777c92065083aba0bbf74aafc780f5fb.tar.gz
ruby-c2d87245777c92065083aba0bbf74aafc780f5fb.tar.xz
ruby-c2d87245777c92065083aba0bbf74aafc780f5fb.zip
pass DRb info to sub thread
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@7968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/drb/drb.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/drb/drb.rb b/lib/drb/drb.rb
index ab2cba894..a3abd4511 100644
--- a/lib/drb/drb.rb
+++ b/lib/drb/drb.rb
@@ -1455,13 +1455,16 @@ module DRb
setup_message
if $SAFE < @safe_level
+ info = Thread.current['DRb']
if @block
- @result = Thread.new {
+ @result = Thread.new {
+ Thread.current['DRb'] = info
$SAFE = @safe_level
perform_with_block
}.value
else
@result = Thread.new {
+ Thread.current['DRb'] = info
$SAFE = @safe_level
perform_without_block
}.value