atomic-ruby 0.11.0 → 0.12.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 396ed4e43a0e36238ac1eb035c1f43d425361ff3d639e2df201da916ddf3a44d
4
- data.tar.gz: 23471d0933619e790bcdab2b1aad3f6bbe9d008a924cae405fdd177fe423ad6a
3
+ metadata.gz: 0171c5fec65586e1a6b090b65e266a8c4fa88c5a3fa7c98e6c41c5fd63654f31
4
+ data.tar.gz: aa26033345014a3d64ff81faa7ac812fc3de3d4189f9c59d0f559684429d7540
5
5
  SHA512:
6
- metadata.gz: 38e99ffccfd1d96db774afd86b9a6fec93ed2f5a1f9bf479c7d1e490f0948fc5f4f9827ec567a07b493b16079ee482f7ec769c125432142fe83af7e19d753c87
7
- data.tar.gz: 98e3a33278772ea4c4a7731462591403e65bedc6a6524ffbe984c41b43651e383a09f5d0ba3a58ad464d9158f6dd8702e777549cfcbb9fc905afc8c668830d30
6
+ metadata.gz: 226c50dd465ec5f255f6b5a2991e64939bcdf77d08ecdda4f9c6aea8ee68de16cdb46ac2be7b6705417b316a40a4c4159cf21b4eef34759f0bc939a544930f50
7
+ data.tar.gz: 4e80ac5fc97aed98950779897c5308d5d3f8180424cca09e4af611d980570b67b3305a1bc0557f8d4278a6b618f7c3ee69d2a60935764e5f59f7769f04711967
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.12.0] - 2026-05-18
4
+
5
+ - Wake idle `AtomicThreadPool` workers on enqueue
6
+
7
+ ## [0.11.1] - 2026-05-17
8
+
9
+ - Replace `Thread.pass` busy-wait with `sleep` in idle `AtomicThreadPool` workers
10
+
3
11
  ## [0.11.0] - 2026-05-10
4
12
 
5
13
  - Use `warn` in `AtomicThreadPool` error output
data/README.md CHANGED
@@ -379,13 +379,13 @@ puts "Atomic Ruby Atomic Thread Pool: #{results[1].real.round(6)} seconds"
379
379
  ```
380
380
  > bundle exec rake compile && bundle exec ruby examples/atomic_thread_pool_benchmark.rb
381
381
 
382
- ruby version: ruby 4.0.3 (2026-04-21 revision 85ddef263a) +YJIT +PRISM [arm64-darwin23]
382
+ ruby version: ruby 4.0.4 (2026-05-12 revision b89eb1bcbf) +YJIT +PRISM [arm64-darwin23]
383
383
  concurrent-ruby version: 1.3.6
384
- atomic-ruby version: 0.11.0
384
+ atomic-ruby version: 0.12.0
385
385
 
386
386
  Benchmark Results:
387
- Concurrent Ruby Thread Pool: 6.168734 seconds
388
- Atomic Ruby Atomic Thread Pool: 5.789739 seconds
387
+ Concurrent Ruby Thread Pool: 5.987538 seconds
388
+ Atomic Ruby Atomic Thread Pool: 5.528936 seconds
389
389
  ```
390
390
 
391
391
  </details>
@@ -126,6 +126,8 @@ module AtomicRuby
126
126
  end
127
127
  end
128
128
  raise EnqueuedWorkAfterShutdownError if state[:shutdown]
129
+
130
+ @threads.each(&:wakeup)
129
131
  end
130
132
 
131
133
  # Returns the number of currently alive worker threads.
@@ -294,7 +296,7 @@ module AtomicRuby
294
296
  @active_thread_count.swap { |current_count| current_count - 1 }
295
297
  end
296
298
  else
297
- Thread.pass
299
+ sleep 0.001
298
300
  end
299
301
  end
300
302
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AtomicRuby
4
- VERSION = "0.11.0"
4
+ VERSION = "0.12.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: atomic-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Young
@@ -50,7 +50,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
50
50
  - !ruby/object:Gem::Version
51
51
  version: '0'
52
52
  requirements: []
53
- rubygems_version: 4.0.6
53
+ rubygems_version: 4.0.10
54
54
  specification_version: 4
55
55
  summary: Atomic primitives for Ruby
56
56
  test_files: []