carbon_fiber 0.2.0 → 0.2.1
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 +4 -2
- data/lib/carbon_fiber/scheduler.rb +2 -1
- data/lib/carbon_fiber/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: 5484103990c1343ab0f791beba6b0a2db0a3a1c771f36ba56cb118fa339e9886
|
|
4
|
+
data.tar.gz: e744254ac08ce7b9df3439c102ba7c3bdbaa8fc2063fc86a35ea9b05e0d52ff2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b3dfa811c0b98f6999521866144834789796361e00820400f3481375b28682a09ff989eb407812dbcc3194b78e44070d4da8cf7b6fdc3ff5b59b170341e2b23f
|
|
7
|
+
data.tar.gz: '0588daa84e92f9dbb99762319a64a7146b63f83d3baa96406e670e897a371affcc76b02e2c76acd282c0834e6d4b1172abdc5d4778fe9a24c4803ef2084d47e6'
|
data/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
## [
|
|
1
|
+
## [0.2.1] - 2026-10-29
|
|
2
2
|
|
|
3
|
-
-
|
|
3
|
+
- Update to Zig 0.17.0; update libxev and zig.rb to the latest versions.
|
|
4
|
+
- Fix closing an IO while a fiber waits on it under Ruby 4.1 (head), which raised `TypeError` instead of `IOError`.
|
|
4
5
|
|
|
5
6
|
## [0.2.0] - 2026-09-05
|
|
6
7
|
|
|
7
8
|
- Work inside Ractors: the native extension is declared Ractor-safe, so each Ractor can install its own `CarbonFiber::Scheduler` (several at once need Ruby 4.0 or later). See the README for the supported messaging pattern.
|
|
8
9
|
- Resolve hostnames in non-main Ractors through the platform resolver on a background thread, since Resolv cannot run there.
|
|
10
|
+
- Fix the pure-Ruby fallback loop burning CPU while a fiber waits on a background thread; inside a non-main Ractor that spin starved the thread it was waiting for and hung the loop.
|
|
9
11
|
- Fix fibers parked in `Queue#pop`, `Mutex#lock`, or any `block` without a timeout being garbage collected while waiting; once unblocked this raised `TypeError: wrong argument type false (expected fiber)` or hung the loop.
|
|
10
12
|
- Fix a race between garbage collection and I/O completions arriving while the loop waits with the GVL released.
|
|
11
13
|
- Support the Ruby 4.1 buffered I/O scheduler contract: `io_read`/`io_write` take `(io, buffer, offset, length)` and perform a single transfer; Ruby 3.4 through 4.0 keep the legacy behavior. (Thanks to [Samuel Williams](https://github.com/samuel-williams-shopify)).
|
|
@@ -370,7 +370,8 @@ module CarbonFiber
|
|
|
370
370
|
end
|
|
371
371
|
|
|
372
372
|
# Deliver an exception to a fiber from another fiber.
|
|
373
|
-
# @param fiber [Fiber]
|
|
373
|
+
# @param fiber [Fiber, Object] the fiber, or on Ruby 4.1+ an
|
|
374
|
+
# operation-scoped Fiber::Scheduler::InterruptTarget for IO interrupts
|
|
374
375
|
# @param exception [Exception]
|
|
375
376
|
def fiber_interrupt(fiber, exception)
|
|
376
377
|
@selector.raise(fiber, exception)
|
data/lib/carbon_fiber/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: carbon_fiber
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Yaroslav Markin
|
|
@@ -149,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
149
149
|
- !ruby/object:Gem::Version
|
|
150
150
|
version: '0'
|
|
151
151
|
requirements: []
|
|
152
|
-
rubygems_version: 4.0.
|
|
152
|
+
rubygems_version: 4.0.20
|
|
153
153
|
specification_version: 4
|
|
154
154
|
summary: High-performance Ruby Fiber Scheduler backed by Zig with libxev. Pure Ruby
|
|
155
155
|
and gem async.
|