3 ms·
Timeout: Ruby's Most Dangerous API
- bascule 11y agoIf you're looking for an HTTP library with an advanced timeout API that doesn't use Timeout/timeout.rb (but instead uses an asynchronous I/O layer), check out http.rb: https://github.com/httprb/http https://github.com/httprb/http
- duaneb 11y agoIs there any real alternative to celluloid/event machine? I've seen enough of EM's implementation to be skittish using it. Ruby's async story is in a dire state if people are seriously using Timeout today, and it doesn't look like you could plausibly write an alternative AVOIDING event machine. Thoughts?
- nsp 11y agoI've found this list particularly helpful when tearing the stdlib Timeout out of legacy projects - https://github.com/ankane/the-ultimate-guide-to-ruby-timeouts https://github.com/ankane/the-ultimate-guide-to-ruby-timeout... Not comprehensive, but covers a surprising number of gems.
- oconnor663 11y agoNaive question from a Python programmer: Does this problem come from Ruby not having a standardized exception-safe way of freeing resources (like Python's `with`)? Or is there a de facto standard way to do that, and some libraries just forget to use it?