async 2.4.0 → 2.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/async/scheduler.rb +10 -4
- data/lib/async/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +2 -2
- 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: e0734cd025e0357960356ceac7c51d2a3c33efe60f62fcd0ab3d09a528866d7b
|
4
|
+
data.tar.gz: b9658e9b523e90a8d863c2f52cbf4fc8492fe42e6cc63422cb9af2af50582362
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0436e9692d113d2ee40e76e3c792f7ae81a7c563bc93cfe04470fcb84c610795d49a35dfaffa4f7c7f62d2b20efe316d796ca1a573bd997f654db5ba55f9f07a
|
7
|
+
data.tar.gz: 031eab57b8164cd1aa040a4e10d509d3c32db61331cda40c9a5689ef49b199f1d107e0edc154aa2bd5377ea848e0bdaf943b14ba3d3f5d30619c5dcef5ec496a
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/async/scheduler.rb
CHANGED
@@ -50,9 +50,12 @@ module Async
|
|
50
50
|
# We depend on GVL for consistency:
|
51
51
|
# @guard.synchronize do
|
52
52
|
|
53
|
-
|
53
|
+
# We want `@selector = nil` to be a visible side effect from this point forward, specifically in `#interrupt` and `#unblock`. If the selector is closed, then we don't want to push any fibers to it.
|
54
|
+
selector = @selector
|
54
55
|
@selector = nil
|
55
56
|
|
57
|
+
selector&.close
|
58
|
+
|
56
59
|
# end
|
57
60
|
|
58
61
|
consume
|
@@ -69,9 +72,10 @@ module Async
|
|
69
72
|
end
|
70
73
|
|
71
74
|
# Interrupt the event loop and cause it to exit.
|
75
|
+
# @asynchronous May be called from any thread.
|
72
76
|
def interrupt
|
73
77
|
@interrupted = true
|
74
|
-
@selector
|
78
|
+
@selector&.wakeup
|
75
79
|
end
|
76
80
|
|
77
81
|
# Transfer from the calling fiber to the event loop.
|
@@ -127,8 +131,10 @@ module Async
|
|
127
131
|
# $stderr.puts "unblock(#{blocker}, #{fiber})"
|
128
132
|
|
129
133
|
# This operation is protected by the GVL:
|
130
|
-
@selector
|
131
|
-
|
134
|
+
if selector = @selector
|
135
|
+
selector.push(fiber)
|
136
|
+
selector.wakeup
|
137
|
+
end
|
132
138
|
end
|
133
139
|
|
134
140
|
# @asynchronous May be non-blocking..
|
data/lib/async/version.rb
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: async
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
@@ -56,7 +56,7 @@ cert_chain:
|
|
56
56
|
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
57
57
|
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
58
58
|
-----END CERTIFICATE-----
|
59
|
-
date: 2023-03-
|
59
|
+
date: 2023-03-07 00:00:00.000000000 Z
|
60
60
|
dependencies:
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: console
|
metadata.gz.sig
CHANGED
Binary file
|