[#105450] [Ruby master Feature#18228] Add a `timeout` option to `IO.copy_stream` — "byroot (Jean Boussier)" <noreply@...>
Issue #18228 has been reported by byroot (Jean Boussier).
11 messages
2021/09/27
[ruby-core:105404] Contributing tests and ideas for Timeout
From:
"John Bachir" <j@...>
Date:
2021-09-23 23:45:06 UTC
List:
ruby-core #105404
Summary: I would like to maybe help expand the test suite for Timeout, and also maybe contribute to discussion about its behavior. Forgive my long email - please feel free to skip it unless you are interested in Timeout Hello! I'm a long-time ruby programmer and new member of this list. Back in 2013, I made this replacement for ruby 1.9 Timeout (I will rename the gem if I continue developing it): https://code.jjb.cc/sane_timeout-a-replacement-for-ruby-s-standard-library-timeout https://github.com/jjb/sane_timeout I used it for one project back then, but haven't actually used it consistently since then. I've always been meaning to connect with the Timeout maintainers and see if my ideas might find their way into ruby, so I'm finally doing that now. I searched the ruby-core list for recent discussion of timeout, the most recent mention I could find was 2011, I'm not sure if I'm using search incorrectly. If you are interested in my changes: - some very basic new tests for ruby 1.9 timeout, which it does pass https://github.com/jjb/sane_timeout/blob/master/test/test_sane_timeout.rb#L37-L58 - tests demonstrating problems with ruby 1.9 timeout: https://github.com/jjb/sane_timeout/blob/master/test/test_timeout.rb#L61 - my replacement passes them all: https://github.com/jjb/sane_timeout/blob/master/test/test_sane_timeout.rb#L61 - the diff from ruby 1.9 timeout with my replacement (how to solve threading problems? moar threads!): https://github.com/jjb/sane_timeout/commit/354f4e607e928d4e9b0324bc458261b830e75997 If anyone finds any of this interesting, I'd love to hear your thoughts! My general idea for next steps is to start contributing to the timeout tests for current behavior, and then open discussion for proposed behavior changes. John Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>