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 +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +4 -4
- data/lib/atomic-ruby/atomic_thread_pool.rb +3 -1
- data/lib/atomic-ruby/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0171c5fec65586e1a6b090b65e266a8c4fa88c5a3fa7c98e6c41c5fd63654f31
|
|
4
|
+
data.tar.gz: aa26033345014a3d64ff81faa7ac812fc3de3d4189f9c59d0f559684429d7540
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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.
|
|
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.
|
|
384
|
+
atomic-ruby version: 0.12.0
|
|
385
385
|
|
|
386
386
|
Benchmark Results:
|
|
387
|
-
Concurrent Ruby Thread Pool:
|
|
388
|
-
Atomic Ruby Atomic Thread Pool: 5.
|
|
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
|
-
|
|
299
|
+
sleep 0.001
|
|
298
300
|
end
|
|
299
301
|
end
|
|
300
302
|
end
|
data/lib/atomic-ruby/version.rb
CHANGED
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.
|
|
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.
|
|
53
|
+
rubygems_version: 4.0.10
|
|
54
54
|
specification_version: 4
|
|
55
55
|
summary: Atomic primitives for Ruby
|
|
56
56
|
test_files: []
|