polyphony 0.45.0 → 0.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.
Files changed (156) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test.yml +2 -0
  3. data/.gitmodules +0 -0
  4. data/.rubocop.yml +1 -0
  5. data/CHANGELOG.md +38 -0
  6. data/Gemfile.lock +11 -3
  7. data/README.md +3 -3
  8. data/Rakefile +1 -1
  9. data/TODO.md +10 -18
  10. data/examples/adapters/redis_client.rb +3 -1
  11. data/examples/adapters/redis_pubsub_perf.rb +11 -8
  12. data/examples/adapters/sequel_mysql.rb +1 -1
  13. data/examples/adapters/sequel_pg.rb +24 -0
  14. data/examples/core/{02-awaiting-fibers.rb → await.rb} +0 -0
  15. data/examples/core/{xx-channels.rb → channels.rb} +0 -0
  16. data/examples/core/deferring-an-operation.rb +16 -0
  17. data/examples/core/{xx-erlang-style-genserver.rb → erlang-style-genserver.rb} +16 -9
  18. data/examples/core/{xx-forking.rb → forking.rb} +1 -1
  19. data/examples/core/handling-signals.rb +11 -0
  20. data/examples/core/{03-interrupting.rb → interrupt.rb} +0 -0
  21. data/examples/core/{xx-pingpong.rb → pingpong.rb} +7 -5
  22. data/examples/core/{xx-recurrent-timer.rb → recurrent-timer.rb} +1 -1
  23. data/examples/core/{xx-resource_delegate.rb → resource_delegate.rb} +3 -4
  24. data/examples/core/{01-spinning-up-fibers.rb → spin.rb} +1 -1
  25. data/examples/core/{xx-spin_error_backtrace.rb → spin_error_backtrace.rb} +1 -1
  26. data/examples/core/{xx-supervise-process.rb → supervise-process.rb} +8 -5
  27. data/examples/core/supervisor.rb +20 -0
  28. data/examples/core/{xx-thread-sleep.rb → thread-sleep.rb} +0 -0
  29. data/examples/core/{xx-thread_pool.rb → thread_pool.rb} +0 -0
  30. data/examples/core/{xx-throttling.rb → throttling.rb} +0 -0
  31. data/examples/core/{xx-timeout.rb → timeout.rb} +0 -0
  32. data/examples/core/{xx-using-a-mutex.rb → using-a-mutex.rb} +0 -0
  33. data/examples/core/{xx-worker-thread.rb → worker-thread.rb} +2 -2
  34. data/examples/io/{xx-backticks.rb → backticks.rb} +0 -0
  35. data/examples/io/{xx-echo_client.rb → echo_client.rb} +1 -1
  36. data/examples/io/{xx-echo_client_from_stdin.rb → echo_client_from_stdin.rb} +2 -2
  37. data/examples/io/{xx-echo_pipe.rb → echo_pipe.rb} +1 -1
  38. data/examples/io/{xx-echo_server.rb → echo_server.rb} +0 -0
  39. data/examples/io/{xx-echo_server_with_timeout.rb → echo_server_with_timeout.rb} +1 -1
  40. data/examples/io/{xx-echo_stdin.rb → echo_stdin.rb} +0 -0
  41. data/examples/io/{xx-happy-eyeballs.rb → happy-eyeballs.rb} +0 -0
  42. data/examples/io/{xx-httparty.rb → httparty.rb} +4 -13
  43. data/examples/io/{xx-irb.rb → irb.rb} +0 -0
  44. data/examples/io/{xx-net-http.rb → net-http.rb} +0 -0
  45. data/examples/io/{xx-open.rb → open.rb} +0 -0
  46. data/examples/io/{xx-pry.rb → pry.rb} +0 -0
  47. data/examples/io/{xx-rack_server.rb → rack_server.rb} +0 -0
  48. data/examples/io/raw.rb +14 -0
  49. data/examples/io/reline.rb +18 -0
  50. data/examples/io/{xx-system.rb → system.rb} +1 -1
  51. data/examples/io/{xx-tcpserver.rb → tcpserver.rb} +0 -0
  52. data/examples/io/{xx-tcpsocket.rb → tcpsocket.rb} +0 -0
  53. data/examples/io/tunnel.rb +6 -1
  54. data/examples/io/{xx-zip.rb → zip.rb} +0 -0
  55. data/examples/performance/fiber_transfer.rb +2 -1
  56. data/examples/performance/fs_read.rb +5 -6
  57. data/examples/performance/multi_snooze.rb +0 -1
  58. data/examples/{io/xx-switch.rb → performance/switch.rb} +2 -1
  59. data/examples/performance/thread-vs-fiber/{xx-httparty_multi.rb → httparty_multi.rb} +3 -4
  60. data/examples/performance/thread-vs-fiber/{xx-httparty_threaded.rb → httparty_threaded.rb} +0 -0
  61. data/examples/performance/thread-vs-fiber/polyphony_mt_server.rb +1 -1
  62. data/examples/performance/thread-vs-fiber/polyphony_server.rb +1 -2
  63. data/examples/performance/thread-vs-fiber/threaded_server.rb +1 -5
  64. data/examples/performance/thread_pool_perf.rb +6 -7
  65. data/ext/liburing/liburing.h +585 -0
  66. data/ext/liburing/liburing/README.md +4 -0
  67. data/ext/liburing/liburing/barrier.h +73 -0
  68. data/ext/liburing/liburing/compat.h +15 -0
  69. data/ext/liburing/liburing/io_uring.h +343 -0
  70. data/ext/liburing/queue.c +333 -0
  71. data/ext/liburing/register.c +187 -0
  72. data/ext/liburing/setup.c +210 -0
  73. data/ext/liburing/syscall.c +54 -0
  74. data/ext/liburing/syscall.h +18 -0
  75. data/ext/polyphony/backend.h +1 -16
  76. data/ext/polyphony/backend_common.h +109 -0
  77. data/ext/polyphony/backend_io_uring.c +884 -0
  78. data/ext/polyphony/backend_io_uring_context.c +73 -0
  79. data/ext/polyphony/backend_io_uring_context.h +52 -0
  80. data/ext/polyphony/{libev_backend.c → backend_libev.c} +255 -345
  81. data/ext/polyphony/event.c +1 -1
  82. data/ext/polyphony/extconf.rb +31 -13
  83. data/ext/polyphony/fiber.c +111 -27
  84. data/ext/polyphony/libev.c +4 -0
  85. data/ext/polyphony/libev.h +8 -2
  86. data/ext/polyphony/liburing.c +8 -0
  87. data/ext/polyphony/playground.c +51 -0
  88. data/ext/polyphony/polyphony.c +6 -8
  89. data/ext/polyphony/polyphony.h +29 -25
  90. data/ext/polyphony/polyphony_ext.c +13 -6
  91. data/ext/polyphony/queue.c +3 -4
  92. data/ext/polyphony/ring_buffer.c +0 -1
  93. data/ext/polyphony/runqueue.c +102 -0
  94. data/ext/polyphony/runqueue_ring_buffer.c +85 -0
  95. data/ext/polyphony/runqueue_ring_buffer.h +31 -0
  96. data/ext/polyphony/thread.c +45 -92
  97. data/lib/polyphony.rb +2 -2
  98. data/lib/polyphony/adapters/fs.rb +1 -1
  99. data/lib/polyphony/adapters/process.rb +0 -3
  100. data/lib/polyphony/adapters/redis.rb +1 -1
  101. data/lib/polyphony/adapters/trace.rb +2 -2
  102. data/lib/polyphony/core/global_api.rb +9 -12
  103. data/lib/polyphony/core/sync.rb +6 -2
  104. data/lib/polyphony/extensions/core.rb +6 -24
  105. data/lib/polyphony/extensions/debug.rb +13 -0
  106. data/lib/polyphony/extensions/fiber.rb +21 -44
  107. data/lib/polyphony/extensions/io.rb +55 -10
  108. data/lib/polyphony/extensions/socket.rb +70 -12
  109. data/lib/polyphony/version.rb +1 -1
  110. data/polyphony.gemspec +3 -2
  111. data/test/helper.rb +36 -4
  112. data/test/io_uring_test.rb +55 -0
  113. data/test/stress.rb +5 -2
  114. data/test/test_backend.rb +4 -6
  115. data/test/test_ext.rb +1 -2
  116. data/test/test_fiber.rb +31 -24
  117. data/test/test_global_api.rb +58 -31
  118. data/test/test_io.rb +58 -0
  119. data/test/test_signal.rb +11 -8
  120. data/test/test_socket.rb +17 -0
  121. data/test/test_sync.rb +21 -0
  122. data/test/test_throttler.rb +3 -6
  123. data/test/test_trace.rb +7 -5
  124. metadata +86 -76
  125. data/examples/adapters/concurrent-ruby.rb +0 -9
  126. data/examples/core/04-handling-signals.rb +0 -19
  127. data/examples/core/xx-at_exit.rb +0 -29
  128. data/examples/core/xx-backend.rb +0 -102
  129. data/examples/core/xx-caller.rb +0 -12
  130. data/examples/core/xx-daemon.rb +0 -14
  131. data/examples/core/xx-deadlock.rb +0 -8
  132. data/examples/core/xx-deferring-an-operation.rb +0 -14
  133. data/examples/core/xx-exception-backtrace.rb +0 -40
  134. data/examples/core/xx-fork-cleanup.rb +0 -22
  135. data/examples/core/xx-fork-spin.rb +0 -42
  136. data/examples/core/xx-fork-terminate.rb +0 -27
  137. data/examples/core/xx-move_on.rb +0 -23
  138. data/examples/core/xx-queue-async.rb +0 -120
  139. data/examples/core/xx-readpartial.rb +0 -18
  140. data/examples/core/xx-signals.rb +0 -16
  141. data/examples/core/xx-sleep-forever.rb +0 -9
  142. data/examples/core/xx-sleeping.rb +0 -25
  143. data/examples/core/xx-snooze-starve.rb +0 -16
  144. data/examples/core/xx-spin-fork.rb +0 -49
  145. data/examples/core/xx-state-machine.rb +0 -51
  146. data/examples/core/xx-stop.rb +0 -20
  147. data/examples/core/xx-supervisors.rb +0 -21
  148. data/examples/core/xx-thread-selector-sleep.rb +0 -51
  149. data/examples/core/xx-thread-selector-snooze.rb +0 -46
  150. data/examples/core/xx-thread-snooze.rb +0 -34
  151. data/examples/core/xx-timer-gc.rb +0 -17
  152. data/examples/core/xx-trace.rb +0 -79
  153. data/examples/performance/xx-array.rb +0 -11
  154. data/examples/performance/xx-fiber-switch.rb +0 -9
  155. data/examples/performance/xx-snooze.rb +0 -15
  156. data/examples/xx-spin.rb +0 -32
@@ -92,6 +92,48 @@ class IOTest < MiniTest::Test
92
92
  assert_raises(EOFError) { i.readpartial(1) }
93
93
  end
94
94
 
95
+ def test_getc
96
+ i, o = IO.pipe
97
+
98
+ buf = []
99
+ f = spin do
100
+ while (c = i.getc)
101
+ buf << c
102
+ end
103
+ end
104
+
105
+ snooze
106
+ assert_equal [], buf
107
+
108
+ o << 'f'
109
+ snooze
110
+ o << 'g'
111
+ o.close
112
+ f.await
113
+ assert_equal ['f', 'g'], buf
114
+ end
115
+
116
+ def test_getbyte
117
+ i, o = IO.pipe
118
+
119
+ buf = []
120
+ f = spin do
121
+ while (b = i.getbyte)
122
+ buf << b
123
+ end
124
+ end
125
+
126
+ snooze
127
+ assert_equal [], buf
128
+
129
+ o << 'f'
130
+ snooze
131
+ o << 'g'
132
+ o.close
133
+ f.await
134
+ assert_equal [102, 103], buf
135
+ end
136
+
95
137
  # see https://github.com/digital-fabric/polyphony/issues/30
96
138
  def test_reopened_tempfile
97
139
  file = Tempfile.new
@@ -246,4 +288,20 @@ class IOClassMethodsTest < MiniTest::Test
246
288
  assert_equal 1e6, s.bytesize
247
289
  assert s == IO.orig_read(fn)
248
290
  end
291
+
292
+ def pipe_read
293
+ i, o = IO.pipe
294
+ yield o
295
+ o.close
296
+ i.read
297
+ ensure
298
+ i.close
299
+ end
300
+
301
+ def test_puts
302
+ assert_equal "foo\n", pipe_read { |f| f.puts 'foo' }
303
+ assert_equal "foo\n", pipe_read { |f| f.puts "foo\n" }
304
+ assert_equal "foo\nbar\n", pipe_read { |f| f.puts 'foo', 'bar' }
305
+ assert_equal "foo\nbar\n", pipe_read { |f| f.puts 'foo', "bar\n" }
306
+ end
249
307
  end
@@ -3,18 +3,21 @@
3
3
  require_relative 'helper'
4
4
 
5
5
  class SignalTrapTest < Minitest::Test
6
+ def test_int_signal
7
+ Thread.new { sleep 0.001; Process.kill('INT', Process.pid) }
8
+ assert_raises(Interrupt) { sleep 5 }
9
+ end
10
+
11
+ def test_term_signal
12
+ Thread.new { sleep 0.001; Process.kill('TERM', Process.pid) }
13
+ assert_raises(SystemExit) { sleep 5 }
14
+ end
15
+
6
16
  def test_signal_exception_handling
7
17
  i, o = IO.pipe
8
18
  pid = Polyphony.fork do
9
19
  i.close
10
- spin do
11
- spin do
12
- sleep 5
13
- rescue ::Interrupt => e
14
- # the signal should be raised only in the main fiber
15
- o.puts "1-interrupt"
16
- end.await
17
- end.await
20
+ sleep 5
18
21
  rescue ::Interrupt => e
19
22
  o.puts "3-interrupt"
20
23
  ensure
@@ -32,3 +32,20 @@ class SocketTest < MiniTest::Test
32
32
  server&.close
33
33
  end
34
34
  end
35
+
36
+ class HTTPClientTest < MiniTest::Test
37
+ require 'httparty'
38
+ require 'json'
39
+
40
+ def test_http
41
+ res = HTTParty.get('http://worldtimeapi.org/api/timezone/Europe/Paris')
42
+ response = JSON.load(res.body)
43
+ assert_equal "CEST", response['abbreviation']
44
+ end
45
+
46
+ def test_https
47
+ res = HTTParty.get('https://worldtimeapi.org/api/timezone/Europe/Paris')
48
+ response = JSON.load(res.body)
49
+ assert_equal "CEST", response['abbreviation']
50
+ end
51
+ end
@@ -20,6 +20,27 @@ class MutexTest < MiniTest::Test
20
20
  assert_equal ['>> 1', '<< 1', '>> 2', '<< 2', '>> 3', '<< 3'], buf
21
21
  end
22
22
 
23
+ def test_mutex_race_condition
24
+ lock = Polyphony::Mutex.new
25
+ buf = []
26
+ f1 = spin do
27
+ lock.synchronize { buf << 1; snooze; lock.synchronize { buf << 1.1 }; snooze }
28
+ end
29
+ f2 = spin do
30
+ lock.synchronize { buf << 2 }
31
+ end
32
+ f3 = spin do
33
+ lock.synchronize { buf << 3 }
34
+ end
35
+
36
+ snooze
37
+ f2.terminate
38
+
39
+ f3.await
40
+
41
+ assert_equal [1, 1.1, 3], buf
42
+ end
43
+
23
44
  def test_condition_variable
24
45
  buf = []
25
46
  lock1 = Polyphony::Mutex.new
@@ -10,9 +10,7 @@ class ThrottlerTest < MiniTest::Test
10
10
  f = spin { loop { t.process { buffer << 1 } } }
11
11
  sleep 0.2
12
12
  f.stop
13
- elapsed = Time.now - t0
14
- expected = (elapsed * 10).to_i
15
- assert buffer.size >= expected - 1 && buffer.size <= expected + 1
13
+ assert_in_range 1..3, buffer.size
16
14
  ensure
17
15
  t.stop
18
16
  end
@@ -25,7 +23,7 @@ class ThrottlerTest < MiniTest::Test
25
23
  end
26
24
  sleep 0.25
27
25
  f.stop
28
- assert (2..6).include?(buffer.size)
26
+ assert_in_range 2..6, buffer.size
29
27
  ensure
30
28
  t.stop
31
29
  end
@@ -36,8 +34,7 @@ class ThrottlerTest < MiniTest::Test
36
34
  f = spin { loop { t.process { buffer << 1 } } }
37
35
  sleep 0.02
38
36
  f.stop
39
- assert buffer.size >= 2
40
- assert buffer.size <= 3
37
+ assert_in_range 2..3, buffer.size
41
38
  ensure
42
39
  t.stop
43
40
  end
@@ -35,7 +35,9 @@ class TraceTest < MiniTest::Test
35
35
  def test_2_fiber_trace
36
36
  records = []
37
37
  thread = Thread.current
38
- t = Polyphony::Trace.new(:fiber_all) { |r| records << r if Thread.current == thread && r[:event] =~ /^fiber_/ }
38
+ t = Polyphony::Trace.new(:fiber_all) do |r|
39
+ records << r if Thread.current == thread && r[:event] =~ /^fiber_/
40
+ end
39
41
  t.enable
40
42
  Polyphony.trace(true)
41
43
 
@@ -50,15 +52,15 @@ class TraceTest < MiniTest::Test
50
52
  [:current, :fiber_switchpoint],
51
53
  [:f, :fiber_run],
52
54
  [:f, :fiber_switchpoint],
53
- [:f, :fiber_ev_loop_enter],
55
+ [:f, :fiber_event_poll_enter],
54
56
  [:f, :fiber_schedule],
55
- [:f, :fiber_ev_loop_leave],
57
+ [:f, :fiber_event_poll_leave],
56
58
  [:f, :fiber_run],
57
59
  [:f, :fiber_terminate],
58
60
  [:current, :fiber_switchpoint],
59
- [:current, :fiber_ev_loop_enter],
61
+ [:current, :fiber_event_poll_enter],
60
62
  [:current, :fiber_schedule],
61
- [:current, :fiber_ev_loop_leave],
63
+ [:current, :fiber_event_poll_leave],
62
64
  [:current, :fiber_run]
63
65
  ], events
64
66
  ensure
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.45.0
4
+ version: 0.46.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sharon Rosner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-29 00:00:00.000000000 Z
11
+ date: 2020-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake-compiler
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 1.0.5
19
+ version: 1.1.1
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 1.0.5
26
+ version: 1.1.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: minitest
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -198,6 +198,20 @@ dependencies:
198
198
  - - '='
199
199
  - !ruby/object:Gem::Version
200
200
  version: 5.34.0
201
+ - !ruby/object:Gem::Dependency
202
+ name: httparty
203
+ requirement: !ruby/object:Gem::Requirement
204
+ requirements:
205
+ - - '='
206
+ - !ruby/object:Gem::Version
207
+ version: 0.17.1
208
+ type: :development
209
+ prerelease: false
210
+ version_requirements: !ruby/object:Gem::Requirement
211
+ requirements:
212
+ - - '='
213
+ - !ruby/object:Gem::Version
214
+ version: 0.17.1
201
215
  - !ruby/object:Gem::Dependency
202
216
  name: jekyll
203
217
  requirement: !ruby/object:Gem::Requirement
@@ -264,6 +278,7 @@ extra_rdoc_files:
264
278
  files:
265
279
  - ".github/workflows/test.yml"
266
280
  - ".gitignore"
281
+ - ".gitmodules"
267
282
  - ".rubocop.yml"
268
283
  - ".vscode/launch.json"
269
284
  - CHANGELOG.md
@@ -317,7 +332,6 @@ files:
317
332
  - docs/main-concepts/fiber-scheduling.md
318
333
  - docs/main-concepts/index.md
319
334
  - docs/polyphony-logo.png
320
- - examples/adapters/concurrent-ruby.rb
321
335
  - examples/adapters/pg_client.rb
322
336
  - examples/adapters/pg_notify.rb
323
337
  - examples/adapters/pg_pool.rb
@@ -329,70 +343,48 @@ files:
329
343
  - examples/adapters/redis_pubsub_perf.rb
330
344
  - examples/adapters/sequel_mysql.rb
331
345
  - examples/adapters/sequel_mysql_pool.rb
332
- - examples/core/01-spinning-up-fibers.rb
333
- - examples/core/02-awaiting-fibers.rb
334
- - examples/core/03-interrupting.rb
335
- - examples/core/04-handling-signals.rb
336
- - examples/core/xx-at_exit.rb
337
- - examples/core/xx-backend.rb
338
- - examples/core/xx-caller.rb
339
- - examples/core/xx-channels.rb
340
- - examples/core/xx-daemon.rb
341
- - examples/core/xx-deadlock.rb
342
- - examples/core/xx-deferring-an-operation.rb
343
- - examples/core/xx-erlang-style-genserver.rb
344
- - examples/core/xx-exception-backtrace.rb
345
- - examples/core/xx-fork-cleanup.rb
346
- - examples/core/xx-fork-spin.rb
347
- - examples/core/xx-fork-terminate.rb
348
- - examples/core/xx-forking.rb
349
- - examples/core/xx-move_on.rb
350
- - examples/core/xx-pingpong.rb
351
- - examples/core/xx-queue-async.rb
352
- - examples/core/xx-readpartial.rb
353
- - examples/core/xx-recurrent-timer.rb
354
- - examples/core/xx-resource_delegate.rb
355
- - examples/core/xx-signals.rb
356
- - examples/core/xx-sleep-forever.rb
357
- - examples/core/xx-sleeping.rb
358
- - examples/core/xx-snooze-starve.rb
359
- - examples/core/xx-spin-fork.rb
360
- - examples/core/xx-spin_error_backtrace.rb
361
- - examples/core/xx-state-machine.rb
362
- - examples/core/xx-stop.rb
363
- - examples/core/xx-supervise-process.rb
364
- - examples/core/xx-supervisors.rb
365
- - examples/core/xx-thread-selector-sleep.rb
366
- - examples/core/xx-thread-selector-snooze.rb
367
- - examples/core/xx-thread-sleep.rb
368
- - examples/core/xx-thread-snooze.rb
369
- - examples/core/xx-thread_pool.rb
370
- - examples/core/xx-throttling.rb
371
- - examples/core/xx-timeout.rb
372
- - examples/core/xx-timer-gc.rb
373
- - examples/core/xx-trace.rb
374
- - examples/core/xx-using-a-mutex.rb
375
- - examples/core/xx-worker-thread.rb
346
+ - examples/adapters/sequel_pg.rb
347
+ - examples/core/await.rb
348
+ - examples/core/channels.rb
349
+ - examples/core/deferring-an-operation.rb
350
+ - examples/core/erlang-style-genserver.rb
351
+ - examples/core/forking.rb
352
+ - examples/core/handling-signals.rb
353
+ - examples/core/interrupt.rb
354
+ - examples/core/pingpong.rb
355
+ - examples/core/recurrent-timer.rb
356
+ - examples/core/resource_delegate.rb
357
+ - examples/core/spin.rb
358
+ - examples/core/spin_error_backtrace.rb
359
+ - examples/core/supervise-process.rb
360
+ - examples/core/supervisor.rb
361
+ - examples/core/thread-sleep.rb
362
+ - examples/core/thread_pool.rb
363
+ - examples/core/throttling.rb
364
+ - examples/core/timeout.rb
365
+ - examples/core/using-a-mutex.rb
366
+ - examples/core/worker-thread.rb
367
+ - examples/io/backticks.rb
368
+ - examples/io/echo_client.rb
369
+ - examples/io/echo_client_from_stdin.rb
370
+ - examples/io/echo_pipe.rb
371
+ - examples/io/echo_server.rb
372
+ - examples/io/echo_server_with_timeout.rb
373
+ - examples/io/echo_stdin.rb
374
+ - examples/io/happy-eyeballs.rb
375
+ - examples/io/httparty.rb
376
+ - examples/io/irb.rb
377
+ - examples/io/net-http.rb
378
+ - examples/io/open.rb
379
+ - examples/io/pry.rb
380
+ - examples/io/rack_server.rb
381
+ - examples/io/raw.rb
382
+ - examples/io/reline.rb
383
+ - examples/io/system.rb
384
+ - examples/io/tcpserver.rb
385
+ - examples/io/tcpsocket.rb
376
386
  - examples/io/tunnel.rb
377
- - examples/io/xx-backticks.rb
378
- - examples/io/xx-echo_client.rb
379
- - examples/io/xx-echo_client_from_stdin.rb
380
- - examples/io/xx-echo_pipe.rb
381
- - examples/io/xx-echo_server.rb
382
- - examples/io/xx-echo_server_with_timeout.rb
383
- - examples/io/xx-echo_stdin.rb
384
- - examples/io/xx-happy-eyeballs.rb
385
- - examples/io/xx-httparty.rb
386
- - examples/io/xx-irb.rb
387
- - examples/io/xx-net-http.rb
388
- - examples/io/xx-open.rb
389
- - examples/io/xx-pry.rb
390
- - examples/io/xx-rack_server.rb
391
- - examples/io/xx-switch.rb
392
- - examples/io/xx-system.rb
393
- - examples/io/xx-tcpserver.rb
394
- - examples/io/xx-tcpsocket.rb
395
- - examples/io/xx-zip.rb
387
+ - examples/io/zip.rb
396
388
  - examples/performance/fiber_transfer.rb
397
389
  - examples/performance/fs_read.rb
398
390
  - examples/performance/mem-usage.rb
@@ -400,17 +392,14 @@ files:
400
392
  - examples/performance/multi_snooze.rb
401
393
  - examples/performance/snooze.rb
402
394
  - examples/performance/snooze_raw.rb
395
+ - examples/performance/switch.rb
396
+ - examples/performance/thread-vs-fiber/httparty_multi.rb
397
+ - examples/performance/thread-vs-fiber/httparty_threaded.rb
403
398
  - examples/performance/thread-vs-fiber/polyphony_mt_server.rb
404
399
  - examples/performance/thread-vs-fiber/polyphony_server.rb
405
400
  - examples/performance/thread-vs-fiber/polyphony_server_read_loop.rb
406
401
  - examples/performance/thread-vs-fiber/threaded_server.rb
407
- - examples/performance/thread-vs-fiber/xx-httparty_multi.rb
408
- - examples/performance/thread-vs-fiber/xx-httparty_threaded.rb
409
402
  - examples/performance/thread_pool_perf.rb
410
- - examples/performance/xx-array.rb
411
- - examples/performance/xx-fiber-switch.rb
412
- - examples/performance/xx-snooze.rb
413
- - examples/xx-spin.rb
414
403
  - ext/libev/Changes
415
404
  - ext/libev/LICENSE
416
405
  - ext/libev/README
@@ -427,19 +416,38 @@ files:
427
416
  - ext/libev/ev_win32.c
428
417
  - ext/libev/ev_wrap.h
429
418
  - ext/libev/test_libev_win32.c
419
+ - ext/liburing/liburing.h
420
+ - ext/liburing/liburing/README.md
421
+ - ext/liburing/liburing/barrier.h
422
+ - ext/liburing/liburing/compat.h
423
+ - ext/liburing/liburing/io_uring.h
424
+ - ext/liburing/queue.c
425
+ - ext/liburing/register.c
426
+ - ext/liburing/setup.c
427
+ - ext/liburing/syscall.c
428
+ - ext/liburing/syscall.h
430
429
  - ext/polyphony/backend.h
430
+ - ext/polyphony/backend_common.h
431
+ - ext/polyphony/backend_io_uring.c
432
+ - ext/polyphony/backend_io_uring_context.c
433
+ - ext/polyphony/backend_io_uring_context.h
434
+ - ext/polyphony/backend_libev.c
431
435
  - ext/polyphony/event.c
432
436
  - ext/polyphony/extconf.rb
433
437
  - ext/polyphony/fiber.c
434
438
  - ext/polyphony/libev.c
435
439
  - ext/polyphony/libev.h
436
- - ext/polyphony/libev_backend.c
440
+ - ext/polyphony/liburing.c
441
+ - ext/polyphony/playground.c
437
442
  - ext/polyphony/polyphony.c
438
443
  - ext/polyphony/polyphony.h
439
444
  - ext/polyphony/polyphony_ext.c
440
445
  - ext/polyphony/queue.c
441
446
  - ext/polyphony/ring_buffer.c
442
447
  - ext/polyphony/ring_buffer.h
448
+ - ext/polyphony/runqueue.c
449
+ - ext/polyphony/runqueue_ring_buffer.c
450
+ - ext/polyphony/runqueue_ring_buffer.h
443
451
  - ext/polyphony/thread.c
444
452
  - ext/polyphony/tracing.c
445
453
  - lib/polyphony.rb
@@ -460,6 +468,7 @@ files:
460
468
  - lib/polyphony/core/thread_pool.rb
461
469
  - lib/polyphony/core/throttler.rb
462
470
  - lib/polyphony/extensions/core.rb
471
+ - lib/polyphony/extensions/debug.rb
463
472
  - lib/polyphony/extensions/fiber.rb
464
473
  - lib/polyphony/extensions/io.rb
465
474
  - lib/polyphony/extensions/openssl.rb
@@ -471,6 +480,7 @@ files:
471
480
  - test/coverage.rb
472
481
  - test/eg.rb
473
482
  - test/helper.rb
483
+ - test/io_uring_test.rb
474
484
  - test/q.rb
475
485
  - test/run.rb
476
486
  - test/stress.rb
@@ -519,7 +529,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
519
529
  - !ruby/object:Gem::Version
520
530
  version: '0'
521
531
  requirements: []
522
- rubygems_version: 3.1.2
532
+ rubygems_version: 3.1.4
523
533
  signing_key:
524
534
  specification_version: 4
525
535
  summary: Fine grained concurrency for Ruby