timeout 0.4.3 → 0.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/timeout.rb +4 -1
  3. metadata +3 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fd4f136237f88c0a2be5a602882f7cdddc0f5ea1429de76f931cb2ec9718a93c
4
- data.tar.gz: d86f8c2744f1ac20722c3d9def4979c1452b4548291cd8a287f89216199f1c7c
3
+ metadata.gz: 2e546a82029e45c714f45f0a47cbcb3e747ba7faee26569c1c23126aa15af62f
4
+ data.tar.gz: 3a3b43a30e17b257eb10efbaf542cfa1cba3f2382900c5d84d6fc8ffd48fc053
5
5
  SHA512:
6
- metadata.gz: 38d56618f21b6b4a5b75cf0e40ec66341aba9dab49ff948becee93a8ca1985e759208b7a4408511914d21f818ba1c37dae2fa2b6af48f43d72e1fc555eddf9b4
7
- data.tar.gz: acdbb666b3d85f2ca400e583d29f282e1e1568b7fa0f334ea502ad18f17ff99e64bc6b3cf4eb111a283be9b1e88bea1068a249aa6caf5d8bcbc64d745ba7f2e9
6
+ metadata.gz: aed390b63eb9cbbf06ad8077e107fc8524400102b63bd02615336ecf051e86c35d5258df1e148246c0675c22c84dfc4a652f9b1dffeef79515c011ffec31eb9b
7
+ data.tar.gz: e53db10269c082ff01290139ab63783b1e33e4f2cf29a33ef7741af766256187f54270a16c9f1da84060a4824b5bb723d1822043513a4f7292947588d11f5f99
data/lib/timeout.rb CHANGED
@@ -20,7 +20,7 @@
20
20
 
21
21
  module Timeout
22
22
  # The version
23
- VERSION = "0.4.3"
23
+ VERSION = "0.4.4"
24
24
 
25
25
  # Internal error raised to when a timeout is triggered.
26
26
  class ExitException < Exception
@@ -123,6 +123,9 @@ module Timeout
123
123
 
124
124
  def self.ensure_timeout_thread_created
125
125
  unless @timeout_thread and @timeout_thread.alive?
126
+ # If the Mutex is already owned we are in a signal handler.
127
+ # In that case, just return and let the main thread create the @timeout_thread.
128
+ return if TIMEOUT_THREAD_MUTEX.owned?
126
129
  TIMEOUT_THREAD_MUTEX.synchronize do
127
130
  unless @timeout_thread and @timeout_thread.alive?
128
131
  @timeout_thread = create_timeout_thread
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: timeout
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yukihiro Matsumoto
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-12-16 00:00:00.000000000 Z
10
+ date: 2025-10-29 00:00:00.000000000 Z
12
11
  dependencies: []
13
12
  description: Auto-terminate potentially long-running operations in Ruby.
14
13
  email:
@@ -32,7 +31,6 @@ metadata:
32
31
  homepage_uri: https://github.com/ruby/timeout
33
32
  source_code_uri: https://github.com/ruby/timeout
34
33
  changelog_uri: https://github.com/ruby/timeout/releases
35
- post_install_message:
36
34
  rdoc_options: []
37
35
  require_paths:
38
36
  - lib
@@ -47,8 +45,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
47
45
  - !ruby/object:Gem::Version
48
46
  version: '0'
49
47
  requirements: []
50
- rubygems_version: 3.5.11
51
- signing_key:
48
+ rubygems_version: 3.6.9
52
49
  specification_version: 4
53
50
  summary: Auto-terminate potentially long-running operations in Ruby.
54
51
  test_files: []