IO gets causes a write block
----------------------------

                 Key: JRUBY-2141
                 URL: http://jira.codehaus.org/browse/JRUBY-2141
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules, Extensions
    Affects Versions: JRuby 1.1RC2
         Environment: Windows XP
            Reporter: Adam Payne
         Attachments: test_duplex_socket.rb

The Stomp gem uses TCPSocket#gets inside a thread for synchronous reads, and 
writes to the socket using TCPSocket#puts. With the current NIO refactoring, 
this causes the sending thread to block. The attached test 
(test_duplex_socket.rb) shows it timing out after 5 seconds.

I tried immediately turning off blocking in RubyTCPSocket.java, which caused 
the test to pass. However, it knocked out open-uri for reading over HTTP, so 
that doesn't look like the solution.

Both test cases pass under MRI.

-- 
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