polyphony 0.99.3 → 0.99.5
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/.rubocop.yml +10 -0
- data/.yardopts +3 -1
- data/README.md +1 -1
- data/docs/readme.md +102 -0
- data/examples/pipes/gzip_http_server.rb +2 -2
- data/examples/pipes/http_server.rb +1 -1
- data/examples/pipes/tcp_proxy.rb +1 -1
- data/ext/polyphony/backend_common.c +4 -4
- data/ext/polyphony/backend_io_uring.c +8 -8
- data/ext/polyphony/backend_libev.c +5 -5
- data/ext/polyphony/fiber.c +32 -41
- data/ext/polyphony/io_extensions.c +50 -37
- data/ext/polyphony/pipe.c +6 -18
- data/ext/polyphony/polyphony.c +63 -133
- data/ext/polyphony/queue.c +25 -63
- data/ext/polyphony/thread.c +3 -12
- data/lib/polyphony/adapters/process.rb +1 -2
- data/lib/polyphony/adapters/sequel.rb +2 -2
- data/lib/polyphony/core/debug.rb +1 -1
- data/lib/polyphony/core/exceptions.rb +1 -1
- data/lib/polyphony/core/global_api.rb +24 -38
- data/lib/polyphony/core/resource_pool.rb +7 -8
- data/lib/polyphony/core/sync.rb +1 -2
- data/lib/polyphony/core/thread_pool.rb +2 -5
- data/lib/polyphony/core/throttler.rb +1 -5
- data/lib/polyphony/core/timer.rb +24 -25
- data/lib/polyphony/extensions/fiber.rb +507 -540
- data/lib/polyphony/extensions/io.rb +3 -12
- data/lib/polyphony/extensions/openssl.rb +2 -23
- data/lib/polyphony/extensions/pipe.rb +4 -15
- data/lib/polyphony/extensions/socket.rb +15 -109
- data/lib/polyphony/extensions/thread.rb +0 -13
- data/lib/polyphony/extensions/timeout.rb +0 -1
- data/lib/polyphony/net.rb +5 -8
- data/lib/polyphony/version.rb +1 -1
- data/lib/polyphony.rb +2 -6
- data/test/test_io.rb +221 -221
- data/test/test_socket.rb +3 -3
- data/test/test_trace.rb +2 -2
- metadata +3 -2
data/test/test_socket.rb
CHANGED
@@ -199,7 +199,7 @@ class TCPSocketWithRawBufferTest < MiniTest::Test
|
|
199
199
|
[port, server]
|
200
200
|
rescue Errno::EADDRINUSE
|
201
201
|
retry
|
202
|
-
end
|
202
|
+
end
|
203
203
|
|
204
204
|
def setup
|
205
205
|
super
|
@@ -337,13 +337,13 @@ class SSLSocketTest < MiniTest::Test
|
|
337
337
|
def test_ssl_accept_loop
|
338
338
|
authority = Localhost::Authority.fetch
|
339
339
|
server_ctx = authority.server_context
|
340
|
-
|
340
|
+
|
341
341
|
opts = {
|
342
342
|
reuse_addr: true,
|
343
343
|
dont_linger: true,
|
344
344
|
secure_context: server_ctx
|
345
345
|
}
|
346
|
-
|
346
|
+
|
347
347
|
port = rand(10001..39999)
|
348
348
|
server = Polyphony::Net.tcp_listen('127.0.0.1', port, opts)
|
349
349
|
f = spin do
|
data/test/test_trace.rb
CHANGED
@@ -49,7 +49,7 @@ class TraceTest < MiniTest::Test
|
|
49
49
|
sleep 0
|
50
50
|
|
51
51
|
Thread.backend.trace_proc = nil
|
52
|
-
|
52
|
+
|
53
53
|
assert_equal [
|
54
54
|
[:spin, f],
|
55
55
|
[:schedule, f, nil, false],
|
@@ -143,7 +143,7 @@ class TraceTest < MiniTest::Test
|
|
143
143
|
}
|
144
144
|
}
|
145
145
|
receive
|
146
|
-
|
146
|
+
|
147
147
|
Polyphony::Trace.start_event_firehose { |e| receiver << e }
|
148
148
|
|
149
149
|
f1 = spin(:f1) do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: polyphony
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.99.
|
4
|
+
version: 0.99.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sharon Rosner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-05-
|
11
|
+
date: 2023-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake-compiler
|
@@ -164,6 +164,7 @@ files:
|
|
164
164
|
- docs/link_rewriter.rb
|
165
165
|
- docs/main-concepts/index.md
|
166
166
|
- docs/overview.md
|
167
|
+
- docs/readme.md
|
167
168
|
- docs/tutorial.md
|
168
169
|
- docs/whats-new.md
|
169
170
|
- examples/adapters/pg_client.rb
|