Issue #372 has been updated by Motohiro KOSAKI.

Category set to ext
Status changed from Rejected to Assigned
Assignee set to Masatoshi Seki
Target version set to 1.9.x
ruby -v set to -

redmine???????????????????????????????????????????????????????????
reopen?????????????????????????????

----------------------------------------
Bug #372: Rinda has a race condition
http://redmine.ruby-lang.org/issues/372

Author: Anonymous
Status: Assigned
Priority: Low
Assignee: Masatoshi Seki
Category: ext
Target version: 1.9.x
ruby -v: -


=begin
 ???????????????
 
 1.8系??tuplespace.rb???修正??????????????????????????????
 1.8系???????????????????????????????
 
 ???????????????1.8???tuplespace.rb???1.9??? 
 ci?????????????????????????
 ?????????????????????????度??????????????????????????
 #???????????中?????????????????????????
 
 On 2008/07/24, at 22:22, Yusuke ENDOH wrote:
 >
 >
 > 調??????????????????????????以???????????? Rinda ????? 
 > ???????????????????
 >
 >
 > Index: lib/rinda/tuplespace.rb
 > ===================================================================
 > --- lib/rinda/tuplespace.rb     (revision 18194)
 > +++ lib/rinda/tuplespace.rb     (working copy)
 > @@ -570,6 +570,7 @@
 >           keep_clean
 >           sleep(@period)
 >         end
 > +        sleep 3
 >       end
 >     end
 >
 >
 > 以????? deadlock detected ????????????1.8 ??????? 
 > ????????
 
 似????????????????????延?????????????????????????????????????????
 
 Index: lib/rinda/tuplespace.rb
 ===================================================================
 --- lib/rinda/tuplespace.rb	(revision 18222)
 +++ lib/rinda/tuplespace.rb	(working copy)
 @@ -622,6 +622,7 @@
               break unless need_keeper?
               keep_clean
             end
 +sleep(3)
           end
         end
       end
 
 
 
 $ ./ruby -rrinda/tuplespace -e '
 ts = Rinda::TupleSpace.new(1)
 ts.take([:foo, :bar], 1) rescue nil
 sleep 2
 ts.take([:foo, :bar], 1)
 '
 /usr/local/lib/ruby/1.8/rinda/tuplespace.rb:503:in `move':  
 Rinda::RequestExpiredError (Rinda::RequestExpiredError)
 	from /usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize'
 	from /usr/local/lib/ruby/1.8/rinda/tuplespace.rb:488:in `move'
 	from /usr/local/lib/ruby/1.8/rinda/tuplespace.rb:479:in `take'
 	from -e:5
=end



-- 
http://redmine.ruby-lang.org