omq-rs 0.1.1 → 0.1.2

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: 529730a7fd3a4fe212f423bd4404fe12d5b33818cc2ec80df6e971183464f98f
4
- data.tar.gz: 6af2f40b2a2a3dda39d761b6125df5c0d7eb252e0928725caed653d2bfa8f5e4
3
+ metadata.gz: ace7dd4c9d05f6cba6ed58941ed30038c131c3de0a246395baf2b932ac76fa25
4
+ data.tar.gz: 4c6fdc8bd3543f98c01979ba2cabe4460a6c435d92c91b969b7a6bc0e6b7fdd0
5
5
  SHA512:
6
- metadata.gz: 3704feceb32e6e3765de1c5450f0151e96a578ecfc8f6b1ae14a4e024eab25e700f88ae4c39dca36e259471993658e8ba4505d607a51843e60e87dbe83215770
7
- data.tar.gz: 1e936ad84a6292b4a4f3a66ab64cc926a71095d136425fe640c67bfe051a73456199ba6bf59d3fa909248fc1591e2fb7afb4a16726e30100b9283aec0caeec09
6
+ metadata.gz: ff6a09ddfa0c2c1cddad4a369509ed59085143cd5abb208e506a216f5d6c6977db2a4c77384db602f0cd193be1ab4b69b17f4f0b25f31b9a88d236093e415918
7
+ data.tar.gz: a0e77ee6fc098846c4e8e40035ebed72d059cbcbb249c4f264954407cc5fde6ba7f1b3b0294752ad33069e261235269e2c0a87c889636b5b8b04374e31b73f7e
data/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.1.2] - 2026-09-01
6
+
7
+ - Route `Socket#try_recv` directly through the native nonblocking receive path.
8
+ - Avoid Ruby-side batch array churn in hot polling loops.
9
+
5
10
  ## [0.1.1] - 2026-08-23
6
11
 
7
12
  - Document the full public API and publish the RubyDoc documentation link.
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "omq_rs_native"
3
- version = "0.1.1"
3
+ version = "0.1.2"
4
4
  edition = "2024"
5
5
  rust-version = "1.93"
6
6
  license = "ISC"
data/lib/omq/rs/socket.rb CHANGED
@@ -279,7 +279,6 @@ module OMQ
279
279
 
280
280
  @recv_timeout = recv_timeout
281
281
  @send_timeout = send_timeout
282
- @recv_batch = []
283
282
  @request_waiting = false
284
283
  @reply_ready = false
285
284
  @native = Native::Socket.new(@socket_type.to_s.upcase)
@@ -440,18 +439,11 @@ module OMQ
440
439
  # @return [Array<String, Integer>, nil] next message, or +nil+ if none is ready
441
440
  def try_recv
442
441
  ensure_materialized
443
- unless @recv_batch.empty?
444
- message = @recv_batch.shift
445
- received!
446
- return message
447
- end
448
442
 
449
443
  message = if ROUTED_TYPES.include?(@socket_type)
450
444
  @native.try_recv_routed
451
- elsif (batch = @native.try_recv_batch)
452
- first = batch.shift
453
- @recv_batch = batch
454
- first
445
+ else
446
+ @native.try_recv
455
447
  end
456
448
  received! if message
457
449
  message
@@ -5,6 +5,6 @@ module OMQ
5
5
  module Rust
6
6
  # Ruby binding version.
7
7
  # @return [String]
8
- VERSION = "0.1.1"
8
+ VERSION = "0.1.2"
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omq-rs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrik Wenger