From: "dsisnero (Dominic Sisneros)" Date: 2022-11-12T21:54:31+00:00 Subject: [ruby-core:110726] [Ruby master Feature#19059] Introduce top level `module TimeoutError` for aggregating various timeout error classes. Issue #19059 has been updated by dsisnero (Dominic Sisneros). Lots of other languages are starting accept cancellation by using cancel tokens and have timeout a subclass of a Cancelation Error. This is because, sometimes you want to let cancel a task because of timeout, or because of user cancel request, or because of a race between asyn tasks like in golang select or concurrent ml choose. I think this and https://bugs.ruby-lang.org/issues/18630 should consider having something more general than timeout . https://vorpus.org/blog/timeouts-and-cancellation-for-humans/ ---------------------------------------- Feature #19059: Introduce top level `module TimeoutError` for aggregating various timeout error classes. https://bugs.ruby-lang.org/issues/19059#change-100062 * Author: ioquatix (Samuel Williams) * Status: Open * Priority: Normal * Assignee: matz (Yukihiro Matsumoto) ---------------------------------------- This proposal was originally part of but was removed because we could not decide on the name. Introduce the following: ```ruby module TimeoutError end IO::TimeoutError.include(TimeoutError) Regexp::TimeoutError.include(TimeoutError) # Maybe? Timeout::Error.include(TimeoutError) ``` It may be easier for users. This was discussed before with the following conclusion: - Top level `TimeoutError` is available. - Using a module for a `TimeoutError` may not be consistent with other top level `class #{thing}Error`. -- https://bugs.ruby-lang.org/ Unsubscribe: