Project

General

Profile

Actions

Feature #17849

open

Fix Timeout.timeout so that it can be used in threaded Web servers

Added by duerst (Martin Dürst) almost 3 years ago. Updated 16 days ago.

Status:
Assigned
Target version:
-
[ruby-core:103724]

Description

Making this a separate issue from #17837

Eregon (Benoit Daloze) wrote in https://bugs.ruby-lang.org/issues/17837#note-10 (which is about timeouts for regular expressions):

I think fixing Timeout.timeout might be possible.
The main/major issue is it can trigger within ensure, right? Is there anything else?
We could automatically mask Thread#raise within ensure so it only happens after the ensure body completes.
And we could still have a larger "hard timeout" if an ensure takes way too long (shouldn't happen, but one cannot be sure).
I recall discussing this with @schneems (Richard Schneeman) some time ago on Twitter.


Related issues 3 (1 open2 closed)

Related to Ruby master - Feature #17837: Add support for Regexp timeoutsClosedActions
Related to Ruby master - Feature #17363: TimeoutsAssignedko1 (Koichi Sasada)Actions
Related to Ruby master - Bug #13876: Tempfile's finalizer can be interrupted by a Timeout exception which can cause the process to hangClosedActions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0