Queue#push and #pop synchronization failure
-------------------------------------------

                 Key: JRUBY-4858
                 URL: http://jira.codehaus.org/browse/JRUBY-4858
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.5.1
            Reporter: Hiroshi Nakamura
         Attachments: 0001-Test-for-Queue-push-and-pop-synchronization.patch

Queue#push and #pop in lib/thread.rb (imported from MRI) uses
Thread.exclusive for Queue#push and #pop synchronization. It ensures
Queue#push does not return until it wakes up a thread and the thread
consumes the queue when the queue has waiting threads.

We cannot use Thread.exclusive (1.8 mode only) for that purpose in JRuby.

How do we solve this?
 1. Implement Queue with Mutex like CRuby 1.9 (it doesn't have Thread.exclusive)
 2. Reimplement thread.rb in Java.
 3. Improve Thread.exclusive of JRuby and let it work like MRI. Must be hard.
 4. Mark as 'won't fix'.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to