Timeout.rb is not working in special cases (Thread may block whole application).
--------------------------------------------------------------------------------
Key: JRUBY-2970
URL: http://jira.codehaus.org/browse/JRUBY-2970
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.1.5
Environment: Microsoft Windows XP Professional SP3, JDK1.6.0_07, JRuby
1.1.5
Reporter: Maximilian Walther
Attachments: http_test.rb
As already mentioned here (http://jira.codehaus.org/browse/JRUBY-2148), JRuby
is not working correctly when using timeouts, whereas the original Ruby
Interpreter is doing the job in the cases I tested. It would be very nice to
somehow fix this bug, as other classes such as Net::Http are also affected by
JRuby's erratic behaviour. In my example an Http-request to a slow responding
server only throws the Timeout::Error after a response from the server is
received, as Timeout's "Killer-Thread" is blocked by the main thread waiting
for the server's response. A demonstrating script is attached. For executing
the script, a server is required, that waits some seconds before sending the
response (e.g. easy RoR app with sleep(10) in the index method).
--
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