Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ members = ["src/rust", "src/c", "src/python", "src/node"]
resolver = "2"

[workspace.package]
version = "3.0.1"
version = "3.0.2"
edition = "2021"
license = "MIT"
repository = "https://github.com/cloudtoid/interprocess"
Expand Down
2 changes: 1 addition & 1 deletion src/c/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.20)
project(cloudtoid_interprocess VERSION 3.0.1 LANGUAGES C)
project(cloudtoid_interprocess VERSION 3.0.2 LANGUAGES C)
include(GNUInstallDirs)
find_program(CARGO_EXECUTABLE cargo REQUIRED)
get_filename_component(REPO_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/../.." ABSOLUTE)
Expand Down
2 changes: 1 addition & 1 deletion src/c/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ name = "cloudtoid_interprocess"
crate-type = ["cdylib", "staticlib"]

[dependencies]
core-queue = { package = "cloudtoid-interprocess", path = "../rust", version = "3.0.1" }
core-queue = { package = "cloudtoid-interprocess", path = "../rust", version = "3.0.2" }
2 changes: 1 addition & 1 deletion src/node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ doctest = false
crate-type = ["cdylib"]

[dependencies]
core-queue = { package = "cloudtoid-interprocess", path = "../rust", version = "3.0.1" }
core-queue = { package = "cloudtoid-interprocess", path = "../rust", version = "3.0.2" }
# Native calls are synchronous; JS handles waiting. No N-API thread-safe
# callback/GC dispatcher is needed (enabled by napi4 and later).
napi = { version = "3", default-features = false, features = ["napi3"] }
Expand Down
12 changes: 6 additions & 6 deletions src/node/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cloudtoid/interprocess",
"version": "3.0.1",
"version": "3.0.2",
"description": "Fast shared-memory byte queues across Node.js, Rust, C, Go, Python, and .NET",
"main": "index.js",
"types": "index.d.ts",
Expand All @@ -25,11 +25,11 @@
"test": "node --test test.js"
},
"optionalDependencies": {
"@cloudtoid/interprocess-darwin-arm64": "3.0.1",
"@cloudtoid/interprocess-darwin-x64": "3.0.1",
"@cloudtoid/interprocess-linux-x64": "3.0.1",
"@cloudtoid/interprocess-win32-x64": "3.0.1",
"@cloudtoid/interprocess-linux-arm64": "3.0.1"
"@cloudtoid/interprocess-darwin-arm64": "3.0.2",
"@cloudtoid/interprocess-darwin-x64": "3.0.2",
"@cloudtoid/interprocess-linux-x64": "3.0.2",
"@cloudtoid/interprocess-win32-x64": "3.0.2",
"@cloudtoid/interprocess-linux-arm64": "3.0.2"
},
"exports": {
".": {
Expand Down
2 changes: 1 addition & 1 deletion src/python/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ name = "_native"
crate-type = ["cdylib"]

[dependencies]
core-queue = { package = "cloudtoid-interprocess", path = "../rust", version = "3.0.1" }
core-queue = { package = "cloudtoid-interprocess", path = "../rust", version = "3.0.2" }
pyo3 = { version = "0.29", features = ["extension-module", "abi3-py39"] }

[build-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion src/python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "maturin"

[project]
name = "cloudtoid-interprocess"
version = "3.0.1"
version = "3.0.2"
description = "Fast shared-memory byte queues across Python, Rust, C, Go, Node.js, and .NET"
requires-python = ">=3.9"
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion src/python/python/cloudtoid_interprocess/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
from ._native import Publisher, Subscriber

__all__ = ["Publisher", "Subscriber", "InterprocessError", "CapacityMismatchError", "PublisherLimitError", "CorruptQueueError"]
__version__ = "3.0.1"
__version__ = "3.0.2"
8 changes: 8 additions & 0 deletions src/python/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,14 @@ impl Subscriber {
.map_err(|_| PyValueError::new_err("timeout must be finite and nonnegative"))
})
.transpose()?;
if timeout.is_some_and(|limit| limit.is_zero()) {
py.check_signals()?;
let message = self.try_receive(py)?;
if message.is_none() {
py.check_signals()?;
}
return Ok(message);
}
let started = Instant::now();
loop {
py.check_signals()?;
Expand Down
1 change: 1 addition & 0 deletions src/python/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def test_api(self):
self.assertEqual(s.receive(timeout=0), b"a")
self.assertEqual(s.receive(timeout=1), b"b")
self.assertIsNone(s.receive(timeout=0.005))
self.assertIsNone(s.receive(timeout=0))
with self.assertRaises(ValueError): s.receive(timeout=-1)
with self.assertRaises(ValueError): p.try_send(b"closed")
with self.assertRaises(ValueError): s.try_receive()
Expand Down
Loading