async 2.45.1 → 2.46.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
- checksums.yaml.gz.sig +0 -0
- data/lib/async/task.rb +5 -0
- data/lib/async/version.rb +1 -1
- data/readme.md +4 -5
- data/releases.md +4 -0
- data.tar.gz.sig +0 -0
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 18ce3669315568ddd2a3318bf2b0ab7bdee50c4fe2e902a706c06d81a408eaf8
|
|
4
|
+
data.tar.gz: c29f7d729d77e461520d10016ae4a54d9381fdf2c6d6abfa3c0f46552f1534d4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1cbe34605af8123fa6f793053e27fa812a7b0709e9e4e5a4a7cc94a5d7331ca7b5f4179f794a30b0c73beafde19cea01ef767d5703e9993103a6ee41d89c09c2
|
|
7
|
+
data.tar.gz: aa02831263ecc1476e8d4f36ee39177b74a6c3ef5f6d823a5e5346ae5c9747c357e6cf37a588d1348a1f553d3d97a6d65ccb51f8454e001d5f5278aa0981a458
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/lib/async/task.rb
CHANGED
|
@@ -327,6 +327,11 @@ module Async
|
|
|
327
327
|
# @parameter later [Boolean] Whether to cancel the task later, or immediately.
|
|
328
328
|
# @parameter cause [Exception] The cause of the cancel operation.
|
|
329
329
|
def cancel(later = false, cause: $!)
|
|
330
|
+
# On affected Ruby versions, `Thread#kill` exposes the internal `TAG_FATAL` value through `$!`, which is not a valid exception cause:
|
|
331
|
+
unless cause.is_a?(::Exception)
|
|
332
|
+
cause = nil
|
|
333
|
+
end
|
|
334
|
+
|
|
330
335
|
# If no cause is given, we generate one from the current call stack:
|
|
331
336
|
unless cause
|
|
332
337
|
cause = Cancel::Cause.for("Cancelling task!")
|
data/lib/async/version.rb
CHANGED
data/readme.md
CHANGED
|
@@ -35,6 +35,10 @@ Please see the [project documentation](https://socketry.github.io/async/) for mo
|
|
|
35
35
|
|
|
36
36
|
Please see the [project releases](https://socketry.github.io/async/releases/index) for all releases.
|
|
37
37
|
|
|
38
|
+
### v2.46.0
|
|
39
|
+
|
|
40
|
+
- Fixed `Thread#kill` raising a `TypeError` while shutting down a thread with an active `Async::Reactor`.
|
|
41
|
+
|
|
38
42
|
### v2.45.1
|
|
39
43
|
|
|
40
44
|
- Fixed `Scheduler#io_wait` returning `nil` instead of `false` when an explicit timeout expired. Native callers such as `Socket#connect` with `connect_timeout:` distinguish a timeout by checking for `false`, so the `nil` caused `TypeError: no implicit conversion from nil to integer` instead of the intended `IO::TimeoutError`.
|
|
@@ -71,11 +75,6 @@ Please see the [project releases](https://socketry.github.io/async/releases/inde
|
|
|
71
75
|
|
|
72
76
|
- Fix `Barrier#async` when `parent.async` yields before the child block executes. Previously, `Barrier#wait` could return early and miss tracking the task entirely, because the task had not yet appended itself to the barrier's task list.
|
|
73
77
|
|
|
74
|
-
### v2.38.0
|
|
75
|
-
|
|
76
|
-
- Rename `Task#stop` to `Task#cancel` for better clarity and consistency with common concurrency terminology. The old `stop` method is still available as an alias for backward compatibility, but it is recommended to use `cancel` going forward.
|
|
77
|
-
- Forward arguments from `Task#wait` -\> `Promise#wait`, so `task.wait(timeout: N)` is supported.
|
|
78
|
-
|
|
79
78
|
## See Also
|
|
80
79
|
|
|
81
80
|
- [async-http](https://github.com/socketry/async-http) — Asynchronous HTTP client/server.
|
data/releases.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Releases
|
|
2
2
|
|
|
3
|
+
## v2.46.0
|
|
4
|
+
|
|
5
|
+
- Fixed `Thread#kill` raising a `TypeError` while shutting down a thread with an active `Async::Reactor`.
|
|
6
|
+
|
|
3
7
|
## v2.45.1
|
|
4
8
|
|
|
5
9
|
- Fixed `Scheduler#io_wait` returning `nil` instead of `false` when an explicit timeout expired. Native callers such as `Socket#connect` with `connect_timeout:` distinguish a timeout by checking for `false`, so the `nil` caused `TypeError: no implicit conversion from nil to integer` instead of the intended `IO::TimeoutError`.
|
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
|
Binary file
|