[macruby-changes] [2076] MacRuby/branches/experimental/spec/frozen/library/queue/shared/deque .rb

source_changes at macosforge.org source_changes at macosforge.org
Fri Jul 24 22:48:48 PDT 2009


Revision: 2076
          http://trac.macosforge.org/projects/ruby/changeset/2076
Author:   lsansonetti at apple.com
Date:     2009-07-24 22:48:47 -0700 (Fri, 24 Jul 2009)
Log Message:
-----------
avoid a race condition

Modified Paths:
--------------
    MacRuby/branches/experimental/spec/frozen/library/queue/shared/deque.rb

Modified: MacRuby/branches/experimental/spec/frozen/library/queue/shared/deque.rb
===================================================================
--- MacRuby/branches/experimental/spec/frozen/library/queue/shared/deque.rb	2009-07-25 03:23:51 UTC (rev 2075)
+++ MacRuby/branches/experimental/spec/frozen/library/queue/shared/deque.rb	2009-07-25 05:48:47 UTC (rev 2076)
@@ -24,6 +24,8 @@
       v = 1
     end
 
+    Thread.pass while th.status and th.status != "sleep"
+
     v.should == 0
     q << Object.new
     th.join
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090724/3660de42/attachment.html>


More information about the macruby-changes mailing list