[MacRuby] #542: Attempt to unlock a mutex which is not locked (ThreadError)

MacRuby ruby-noreply at macosforge.org
Sun Jul 31 18:47:05 PDT 2011


#542: Attempt to unlock a mutex which is not locked (ThreadError)
-------------------------------------+--------------------------------------
 Reporter:  valerii.hiora@…          |       Owner:  lsansonetti@…        
     Type:  defect                   |      Status:  new                  
 Priority:  major                    |   Milestone:  MacRuby 1.0          
Component:  MacRuby                  |    Keywords:                       
-------------------------------------+--------------------------------------

Comment(by jhemmelg@…):

 OK, I was looking further into this.  It looks like the mutex is not re-
 locked when cond.wait returns in the main thread.  The synchronize method
 then tries to unlock it and finds it already unlocked.  The documentation
 for ConditionVariable::wait claims to re-lock the mutex on wakeup.  I
 can't see where that is supposed to be happening.  It may be some magic
 with the thread wakeup logic, but I can't see it in either the macruby
 code or the cruby 1.9.2 code.  I'll try to keep digging but I wouldn't be
 disappointed if someone else figures it out first.

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/542#comment:10>
MacRuby <http://macruby.org/>



More information about the macruby-tickets mailing list