omq 0.28.8 → 0.28.9
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 +7 -0
- data/README.md +8 -5
- data/lib/omq/constants.rb +2 -1
- data/lib/omq/reactor.rb +3 -1
- data/lib/omq/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 69989ec63abfcf84fc4a2c6fb6900601a426da84efceda4214756d6cfe6c5730
|
|
4
|
+
data.tar.gz: 8fd5f283d00aa4b41e9a43bf9fd0f9d818e8a33fdfb6e8fba300b815cb87581d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c6a18373a24aee32befeb94f684770f23784417af36f9d6d60475ee1969559105ff4403223dea44caeeafcfe3e18899a6f0e95493a4e05486336a15b37933194
|
|
7
|
+
data.tar.gz: 21e86d33a77985738681f0d248214ccf5b85c2dde32e8efcf94b673ac1323d6a8c434c6b9b04a6315374b4eb129924ab5801af341f79aceb983c33056904f789
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -61,9 +61,12 @@ gem 'omq'
|
|
|
61
61
|
|
|
62
62
|
### Ruby Engines
|
|
63
63
|
|
|
64
|
-
MRI Ruby 3.3 and 4.0 can use the pure Ruby backend. TruffleRuby
|
|
65
|
-
the Rust backend with `backend: :rust`; the pure Ruby backend is
|
|
66
|
-
there because OMQ needs native `Fiber.scheduler` behavior.
|
|
64
|
+
MRI Ruby 3.3 and 4.0 can use the pure Ruby backend. TruffleRuby and JRuby
|
|
65
|
+
should use the Rust backend with `backend: :rust`; the pure Ruby backend is
|
|
66
|
+
not supported there because OMQ needs native `Fiber.scheduler` behavior.
|
|
67
|
+
JRuby support uses OMQ.java on Java 25 or newer. The Java gem selects the
|
|
68
|
+
matching OMQ.java artifact on Linux x86_64, macOS aarch64, macOS x86_64, and
|
|
69
|
+
Windows x86_64.
|
|
67
70
|
|
|
68
71
|
## Quick Start
|
|
69
72
|
|
|
@@ -223,8 +226,8 @@ See the [omq-cli README](https://github.com/paddor/omq-cli) for full documentati
|
|
|
223
226
|
|
|
224
227
|
## Optional Rust backend
|
|
225
228
|
|
|
226
|
-
Install `omq-backend-rust` for
|
|
227
|
-
|
|
229
|
+
Install `omq-backend-rust` for an OMQ.rs backend through the first-class
|
|
230
|
+
`omq-rs` binding. Same socket API, with connection handling on a Tokio runtime.
|
|
228
231
|
|
|
229
232
|
The Rust backend also supports TruffleRuby. The pure Ruby backend currently
|
|
230
233
|
requires MRI-style native `Fiber.scheduler` support, so use `backend: :rust`
|
data/lib/omq/constants.rb
CHANGED
|
@@ -43,6 +43,7 @@ module OMQ
|
|
|
43
43
|
IO::Stream::ConnectionResetError,
|
|
44
44
|
]
|
|
45
45
|
|
|
46
|
+
RESOLUTION_ERROR = defined?(Socket::ResolutionError) ? Socket::ResolutionError : SocketError
|
|
46
47
|
|
|
47
48
|
# Errors raised when a peer cannot be reached.
|
|
48
49
|
CONNECTION_FAILED = [
|
|
@@ -52,7 +53,7 @@ module OMQ
|
|
|
52
53
|
Errno::EHOSTUNREACH,
|
|
53
54
|
Errno::ENETUNREACH,
|
|
54
55
|
Errno::EPROTOTYPE, # IPC: existing socket file is SOCK_DGRAM, not SOCK_STREAM
|
|
55
|
-
|
|
56
|
+
RESOLUTION_ERROR,
|
|
56
57
|
]
|
|
57
58
|
|
|
58
59
|
|
data/lib/omq/reactor.rb
CHANGED
|
@@ -17,7 +17,9 @@ module OMQ
|
|
|
17
17
|
#
|
|
18
18
|
module Reactor
|
|
19
19
|
THREAD_NAME = 'omq-io'
|
|
20
|
-
NATIVE_FIBER_SCHEDULER =
|
|
20
|
+
NATIVE_FIBER_SCHEDULER = RUBY_ENGINE != "jruby" &&
|
|
21
|
+
Fiber.respond_to?(:scheduler) &&
|
|
22
|
+
Fiber.method(:scheduler).source_location.nil?
|
|
21
23
|
|
|
22
24
|
@mutex = Mutex.new
|
|
23
25
|
@pid = nil
|
data/lib/omq/version.rb
CHANGED