polyphony 0.19 → 0.20

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 (186) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -1
  3. data/.rubocop.yml +87 -1
  4. data/CHANGELOG.md +35 -0
  5. data/Gemfile.lock +17 -6
  6. data/README.md +200 -139
  7. data/Rakefile +4 -4
  8. data/TODO.md +35 -7
  9. data/bin/poly +11 -0
  10. data/docs/getting-started/getting-started.md +1 -1
  11. data/docs/summary.md +3 -0
  12. data/docs/technical-overview/exception-handling.md +94 -0
  13. data/docs/technical-overview/fiber-scheduling.md +99 -0
  14. data/examples/core/cancel.rb +8 -4
  15. data/examples/core/channel_echo.rb +18 -17
  16. data/examples/core/defer.rb +12 -0
  17. data/examples/core/enumerator.rb +4 -4
  18. data/examples/core/fiber_error.rb +9 -0
  19. data/examples/core/fiber_error_with_backtrace.rb +73 -0
  20. data/examples/core/fork.rb +6 -6
  21. data/examples/core/genserver.rb +16 -8
  22. data/examples/core/lock.rb +3 -3
  23. data/examples/core/move_on.rb +4 -3
  24. data/examples/core/move_on_twice.rb +5 -5
  25. data/examples/core/move_on_with_ensure.rb +8 -11
  26. data/examples/core/move_on_with_value.rb +14 -0
  27. data/examples/core/{multiple_spawn.rb → multiple_spin.rb} +5 -5
  28. data/examples/core/nested_cancel.rb +5 -5
  29. data/examples/core/{nested_multiple_spawn.rb → nested_multiple_spin.rb} +6 -6
  30. data/examples/core/nested_spin.rb +17 -0
  31. data/examples/core/pingpong.rb +21 -0
  32. data/examples/core/pulse.rb +4 -5
  33. data/examples/core/resource.rb +6 -4
  34. data/examples/core/resource_cancel.rb +6 -9
  35. data/examples/core/resource_delegate.rb +3 -3
  36. data/examples/core/sleep.rb +3 -3
  37. data/examples/core/sleep_spin.rb +19 -0
  38. data/examples/core/snooze.rb +32 -0
  39. data/examples/core/spin.rb +14 -0
  40. data/examples/core/{spawn_cancel.rb → spin_cancel.rb} +6 -7
  41. data/examples/core/spin_error.rb +17 -0
  42. data/examples/core/spin_error_backtrace.rb +30 -0
  43. data/examples/core/spin_uncaught_error.rb +15 -0
  44. data/examples/core/supervisor.rb +8 -8
  45. data/examples/core/supervisor_with_cancel_scope.rb +7 -7
  46. data/examples/core/supervisor_with_error.rb +8 -8
  47. data/examples/core/supervisor_with_manual_move_on.rb +6 -7
  48. data/examples/core/suspend.rb +13 -0
  49. data/examples/core/thread.rb +1 -1
  50. data/examples/core/thread_cancel.rb +9 -11
  51. data/examples/core/thread_pool.rb +18 -14
  52. data/examples/core/throttle.rb +7 -7
  53. data/examples/core/timeout.rb +3 -3
  54. data/examples/fs/read.rb +7 -9
  55. data/examples/http/config.ru +7 -3
  56. data/examples/http/cuba.ru +22 -0
  57. data/examples/http/happy_eyeballs.rb +6 -4
  58. data/examples/http/http_client.rb +1 -1
  59. data/examples/http/http_get.rb +1 -1
  60. data/examples/http/http_parse_experiment.rb +21 -16
  61. data/examples/http/http_proxy.rb +28 -26
  62. data/examples/http/http_server.rb +10 -10
  63. data/examples/http/http_server_forked.rb +6 -5
  64. data/examples/http/http_server_throttled.rb +3 -3
  65. data/examples/http/http_ws_server.rb +11 -11
  66. data/examples/http/https_raw_client.rb +1 -1
  67. data/examples/http/https_server.rb +8 -8
  68. data/examples/http/https_wss_server.rb +13 -11
  69. data/examples/http/rack_server.rb +2 -2
  70. data/examples/http/rack_server_https.rb +4 -4
  71. data/examples/http/rack_server_https_forked.rb +5 -5
  72. data/examples/http/websocket_secure_server.rb +6 -6
  73. data/examples/http/websocket_server.rb +5 -5
  74. data/examples/interfaces/pg_client.rb +4 -4
  75. data/examples/interfaces/pg_pool.rb +13 -6
  76. data/examples/interfaces/pg_transaction.rb +5 -4
  77. data/examples/interfaces/redis_channels.rb +15 -11
  78. data/examples/interfaces/redis_client.rb +2 -2
  79. data/examples/interfaces/redis_pubsub.rb +2 -1
  80. data/examples/interfaces/redis_pubsub_perf.rb +13 -9
  81. data/examples/io/backticks.rb +11 -0
  82. data/examples/io/cat.rb +4 -5
  83. data/examples/io/echo_client.rb +9 -4
  84. data/examples/io/echo_client_from_stdin.rb +20 -0
  85. data/examples/io/echo_pipe.rb +7 -8
  86. data/examples/io/echo_server.rb +8 -6
  87. data/examples/io/echo_server_with_timeout.rb +13 -10
  88. data/examples/io/echo_stdin.rb +3 -3
  89. data/examples/io/httparty.rb +2 -2
  90. data/examples/io/httparty_multi.rb +8 -4
  91. data/examples/io/httparty_threaded.rb +6 -2
  92. data/examples/io/io_read.rb +2 -2
  93. data/examples/io/irb.rb +16 -4
  94. data/examples/io/net-http.rb +3 -3
  95. data/examples/io/open.rb +17 -0
  96. data/examples/io/system.rb +3 -3
  97. data/examples/io/tcpserver.rb +15 -0
  98. data/examples/io/tcpsocket.rb +6 -5
  99. data/examples/performance/multi_snooze.rb +29 -0
  100. data/examples/performance/{perf_snooze.rb → snooze.rb} +7 -5
  101. data/examples/performance/snooze_raw.rb +39 -0
  102. data/ext/gyro/async.c +165 -0
  103. data/ext/gyro/child.c +167 -0
  104. data/ext/{ev → gyro}/extconf.rb +4 -3
  105. data/ext/gyro/gyro.c +316 -0
  106. data/ext/{ev/ev.h → gyro/gyro.h} +12 -7
  107. data/ext/gyro/gyro_ext.c +23 -0
  108. data/ext/{ev → gyro}/io.c +65 -57
  109. data/ext/{ev → gyro}/libev.h +0 -0
  110. data/ext/gyro/signal.c +117 -0
  111. data/ext/{ev → gyro}/socket.c +61 -6
  112. data/ext/gyro/timer.c +199 -0
  113. data/ext/libev/Changes +35 -0
  114. data/ext/libev/README +2 -1
  115. data/ext/libev/ev.c +213 -151
  116. data/ext/libev/ev.h +95 -88
  117. data/ext/libev/ev_epoll.c +26 -15
  118. data/ext/libev/ev_kqueue.c +11 -5
  119. data/ext/libev/ev_linuxaio.c +642 -0
  120. data/ext/libev/ev_poll.c +13 -8
  121. data/ext/libev/ev_port.c +5 -2
  122. data/ext/libev/ev_vars.h +14 -3
  123. data/ext/libev/ev_wrap.h +16 -0
  124. data/lib/ev_ext.bundle +0 -0
  125. data/lib/polyphony.rb +46 -50
  126. data/lib/polyphony/auto_run.rb +12 -0
  127. data/lib/polyphony/core/cancel_scope.rb +11 -7
  128. data/lib/polyphony/core/channel.rb +16 -9
  129. data/lib/polyphony/core/coprocess.rb +101 -51
  130. data/lib/polyphony/core/exceptions.rb +14 -12
  131. data/lib/polyphony/core/resource_pool.rb +21 -8
  132. data/lib/polyphony/core/supervisor.rb +10 -5
  133. data/lib/polyphony/core/sync.rb +7 -6
  134. data/lib/polyphony/core/thread.rb +4 -4
  135. data/lib/polyphony/core/thread_pool.rb +4 -4
  136. data/lib/polyphony/core/throttler.rb +6 -4
  137. data/lib/polyphony/extensions/core.rb +253 -0
  138. data/lib/polyphony/extensions/io.rb +28 -16
  139. data/lib/polyphony/extensions/openssl.rb +2 -1
  140. data/lib/polyphony/extensions/socket.rb +47 -52
  141. data/lib/polyphony/http.rb +4 -3
  142. data/lib/polyphony/http/agent.rb +68 -57
  143. data/lib/polyphony/http/server.rb +5 -5
  144. data/lib/polyphony/http/server/http1.rb +268 -0
  145. data/lib/polyphony/http/server/http2.rb +62 -0
  146. data/lib/polyphony/http/server/http2_stream.rb +104 -0
  147. data/lib/polyphony/http/server/rack.rb +64 -0
  148. data/lib/polyphony/http/server/request.rb +119 -0
  149. data/lib/polyphony/net.rb +26 -15
  150. data/lib/polyphony/postgres.rb +17 -13
  151. data/lib/polyphony/redis.rb +16 -15
  152. data/lib/polyphony/version.rb +1 -1
  153. data/lib/polyphony/websocket.rb +11 -4
  154. data/polyphony.gemspec +13 -9
  155. data/test/eg.rb +27 -0
  156. data/test/helper.rb +25 -0
  157. data/test/run.rb +5 -0
  158. data/test/test_async.rb +33 -0
  159. data/test/test_coprocess.rb +239 -77
  160. data/test/test_core.rb +95 -61
  161. data/test/test_gyro.rb +148 -0
  162. data/test/test_http_server.rb +313 -0
  163. data/test/test_io.rb +79 -27
  164. data/test/test_kernel.rb +22 -12
  165. data/test/test_signal.rb +36 -0
  166. data/test/test_timer.rb +24 -0
  167. metadata +89 -33
  168. data/examples/core/nested_async.rb +0 -17
  169. data/examples/core/next_tick.rb +0 -12
  170. data/examples/core/sleep_spawn.rb +0 -19
  171. data/examples/core/spawn.rb +0 -14
  172. data/examples/core/spawn_error.rb +0 -28
  173. data/examples/performance/perf_multi_snooze.rb +0 -21
  174. data/ext/ev/async.c +0 -168
  175. data/ext/ev/child.c +0 -169
  176. data/ext/ev/ev_ext.c +0 -23
  177. data/ext/ev/ev_module.c +0 -242
  178. data/ext/ev/signal.c +0 -119
  179. data/ext/ev/timer.c +0 -197
  180. data/lib/polyphony/core/fiber_pool.rb +0 -98
  181. data/lib/polyphony/extensions/kernel.rb +0 -169
  182. data/lib/polyphony/http/http1_adapter.rb +0 -254
  183. data/lib/polyphony/http/http2_adapter.rb +0 -157
  184. data/lib/polyphony/http/rack.rb +0 -25
  185. data/lib/polyphony/http/request.rb +0 -66
  186. data/test/test_ev.rb +0 -110
data/test/test_io.rb CHANGED
@@ -1,13 +1,24 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'minitest/autorun'
4
- require 'bundler/setup'
5
- require 'polyphony'
6
- require 'fileutils'
3
+ require_relative 'helper'
4
+
5
+ class GyroIOTest < MiniTest::Test
6
+ def test_that_reading_works
7
+ i, o = IO.pipe
8
+ data = +''
9
+ w = Gyro::IO.new(i, :r)
10
+ w.start do
11
+ i.read_nonblock(8192, data)
12
+ w.stop unless data.empty?
13
+ end
14
+ defer { o << 'hello' }
15
+ suspend
16
+ assert_equal('hello', data)
17
+ end
18
+ end
7
19
 
8
20
  class IOTest < MiniTest::Test
9
21
  def setup
10
- EV.rerun
11
22
  @i, @o = IO.pipe
12
23
  end
13
24
 
@@ -15,24 +26,22 @@ class IOTest < MiniTest::Test
15
26
  count = 0
16
27
  msg = nil
17
28
  [
18
- spin {
19
- @o.write("hello")
29
+ spin do
30
+ @o.write('hello')
20
31
  @o.close
21
- },
32
+ end,
22
33
 
23
- spin {
34
+ spin do
24
35
  while count < 5
25
36
  sleep 0.01
26
37
  count += 1
27
38
  end
28
- },
39
+ end,
29
40
 
30
- spin {
31
- msg = @i.read
32
- }
41
+ spin { msg = @i.read }
33
42
  ].each(&:await)
34
43
  assert_equal(5, count)
35
- assert_equal("hello", msg)
44
+ assert_equal('hello', msg)
36
45
  end
37
46
 
38
47
  def test_that_double_chevron_method_returns_io
@@ -45,10 +54,6 @@ class IOTest < MiniTest::Test
45
54
  end
46
55
 
47
56
  class IOClassMethodsTest < MiniTest::Test
48
- def setup
49
- EV.rerun
50
- end
51
-
52
57
  def test_binread
53
58
  s = IO.binread(__FILE__)
54
59
  assert_kind_of(String, s)
@@ -80,7 +85,7 @@ class IOClassMethodsTest < MiniTest::Test
80
85
  lines = []
81
86
  IO.foreach(__FILE__) { |l| lines << l }
82
87
  assert_equal("# frozen_string_literal: true\n", lines[0])
83
- assert_equal("end", lines[-1])
88
+ assert_equal("end\n", lines[-1])
84
89
  end
85
90
 
86
91
  def test_read
@@ -101,7 +106,7 @@ class IOClassMethodsTest < MiniTest::Test
101
106
  def test_readlines
102
107
  lines = IO.readlines(__FILE__)
103
108
  assert_equal("# frozen_string_literal: true\n", lines[0])
104
- assert_equal("end", lines[-1])
109
+ assert_equal("end\n", lines[-1])
105
110
  end
106
111
 
107
112
  WRITE_DATA = "foo\nbar קוקו"
@@ -118,17 +123,64 @@ class IOClassMethodsTest < MiniTest::Test
118
123
 
119
124
  def test_popen
120
125
  counter = 0
121
- timer = spin {
122
- throttled_loop(200) { counter += 1 }
123
- }
126
+ timer = spin { throttled_loop(200) { counter += 1 } }
124
127
 
125
- IO.popen('sleep 0.01') { |io| io.read }
126
- assert(counter >= 2)
128
+ IO.popen('sleep 0.1') { |io| io.read(8192) }
129
+ assert(counter >= 10)
127
130
 
128
131
  result = nil
129
- IO.popen('echo "foo"') { |io| result = io.read }
132
+ IO.popen('echo "foo"') { |io| result = io.read(8192) }
130
133
  assert_equal("foo\n", result)
131
134
  ensure
132
135
  timer&.stop
133
136
  end
134
- end
137
+
138
+ def test_kernel_gets
139
+ counter = 0
140
+ timer = spin { throttled_loop(200) { counter += 1 } }
141
+
142
+ i, o = IO.pipe
143
+ orig_stdin = $stdin
144
+ $stdin = i
145
+ spin do
146
+ sleep 0.01
147
+ o.puts 'foo'
148
+ o.close
149
+ end
150
+
151
+ assert(counter >= 0)
152
+ assert_equal("foo\n", gets)
153
+ ensure
154
+ $stdin = orig_stdin
155
+ timer&.stop
156
+ end
157
+
158
+ def test_kernel_gets_with_argv
159
+ ARGV << __FILE__
160
+
161
+ s = StringIO.new(IO.orig_read(__FILE__))
162
+
163
+ while (l = s.gets)
164
+ assert_equal(l, gets)
165
+ end
166
+ ensure
167
+ ARGV.delete __FILE__
168
+ end
169
+
170
+ def test_kernel_puts
171
+ orig_stdout = $stdout
172
+ o = eg(
173
+ '@buf': +'',
174
+ write: ->(*args) { args.each { |a| @buf << a } },
175
+ flush: -> {},
176
+ buf: -> { @buf }
177
+ )
178
+
179
+ $stdout = o
180
+
181
+ puts 'foobar'
182
+ assert_equal("foobar\n", o.buf)
183
+ ensure
184
+ $stdout = orig_stdout
185
+ end
186
+ end
data/test/test_kernel.rb CHANGED
@@ -1,26 +1,36 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'minitest/autorun'
4
- require 'bundler/setup'
5
- require 'polyphony'
3
+ require_relative 'helper'
6
4
 
7
5
  class KernelTest < MiniTest::Test
8
- def setup
9
- EV.rerun
10
- end
11
-
12
6
  def test_system_method
13
7
  counter = 0
14
- timer = spin {
15
- throttled_loop(200) { counter += 1 }
16
- }
8
+ timer = spin { throttled_loop(200) { counter += 1 } }
17
9
 
18
10
  system('sleep 0.01')
19
11
  assert(counter >= 2)
20
12
 
21
- result = system('echo "hello"')
13
+ i, o = IO.pipe
14
+ orig_stdout = $stdout
15
+ $stdout = o
16
+ system('echo "hello"')
17
+ o.close
18
+ assert_equal("hello\n", i.read)
19
+ ensure
20
+ $stdout = orig_stdout
21
+ timer&.stop
22
+ end
23
+
24
+ def test_backtick_method
25
+ counter = 0
26
+ timer = spin { throttled_loop(200) { counter += 1 } }
27
+
28
+ `sleep 0.01`
29
+ assert(counter >= 2)
30
+
31
+ result = `echo "hello"`
22
32
  assert_equal("hello\n", result)
23
33
  ensure
24
34
  timer&.stop
25
35
  end
26
- end
36
+ end
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'helper'
4
+
5
+ class SignalTest < MiniTest::Test
6
+ def test_Gyro_Signal_constructor
7
+ sig = Signal.list['USR1']
8
+ count = 0
9
+ w = Gyro::Signal.new(sig) do
10
+ count += 1
11
+ w.stop
12
+ end
13
+ Thread.new do
14
+ sync_sleep 0.001
15
+ Process.kill(:USR1, Process.pid)
16
+ end
17
+ suspend
18
+ assert_equal(1, count)
19
+ end
20
+
21
+ def test_trap_api
22
+ count = 0
23
+ w = Polyphony.trap(:usr1, true) do
24
+ count += 1
25
+ w.stop
26
+ end
27
+
28
+ assert_kind_of(Gyro::Signal, w)
29
+ Thread.new do
30
+ sync_sleep 0.001
31
+ Process.kill(:USR1, Process.pid)
32
+ end
33
+ suspend
34
+ assert_equal(1, count)
35
+ end
36
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'helper'
4
+
5
+ class TimerTest < MiniTest::Test
6
+ def test_that_one_shot_timer_works
7
+ count = 0
8
+ t = Gyro::Timer.new(0.01, 0)
9
+ t.start { count += 1 }
10
+ suspend
11
+ assert_equal(1, count)
12
+ end
13
+
14
+ def test_that_repeating_timer_works
15
+ count = 0
16
+ t = Gyro::Timer.new(0.001, 0.001)
17
+ t.start do
18
+ count += 1
19
+ t.stop if count >= 3
20
+ end
21
+ suspend
22
+ assert_equal(3, count)
23
+ end
24
+ end
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.19'
4
+ version: '0.20'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sharon Rosner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-12 00:00:00.000000000 Z
11
+ date: 2019-11-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: modulation
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - '='
53
53
  - !ruby/object:Gem::Version
54
54
  version: 0.10.0
55
+ - !ruby/object:Gem::Dependency
56
+ name: rack
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: hiredis
57
71
  requirement: !ruby/object:Gem::Requirement
@@ -108,6 +122,20 @@ dependencies:
108
122
  - - '='
109
123
  - !ruby/object:Gem::Version
110
124
  version: 5.11.3
125
+ - !ruby/object:Gem::Dependency
126
+ name: minitest-reporters
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - '='
130
+ - !ruby/object:Gem::Version
131
+ version: 1.4.2
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - '='
137
+ - !ruby/object:Gem::Version
138
+ version: 1.4.2
111
139
  - !ruby/object:Gem::Dependency
112
140
  name: pg
113
141
  requirement: !ruby/object:Gem::Requirement
@@ -166,9 +194,10 @@ dependencies:
166
194
  version: 1.2.8
167
195
  description:
168
196
  email: ciconia@gmail.com
169
- executables: []
197
+ executables:
198
+ - poly
170
199
  extensions:
171
- - ext/ev/extconf.rb
200
+ - ext/gyro/extconf.rb
172
201
  extra_rdoc_files:
173
202
  - README.md
174
203
  files:
@@ -183,36 +212,47 @@ files:
183
212
  - README.md
184
213
  - Rakefile
185
214
  - TODO.md
215
+ - bin/poly
186
216
  - docs/getting-started/getting-started.md
187
217
  - docs/getting-started/tutorial.md
188
218
  - docs/summary.md
219
+ - docs/technical-overview/exception-handling.md
220
+ - docs/technical-overview/fiber-scheduling.md
189
221
  - examples/core/cancel.rb
190
222
  - examples/core/channel_echo.rb
223
+ - examples/core/defer.rb
191
224
  - examples/core/enumerator.rb
225
+ - examples/core/fiber_error.rb
226
+ - examples/core/fiber_error_with_backtrace.rb
192
227
  - examples/core/fork.rb
193
228
  - examples/core/genserver.rb
194
229
  - examples/core/lock.rb
195
230
  - examples/core/move_on.rb
196
231
  - examples/core/move_on_twice.rb
197
232
  - examples/core/move_on_with_ensure.rb
198
- - examples/core/multiple_spawn.rb
199
- - examples/core/nested_async.rb
233
+ - examples/core/move_on_with_value.rb
234
+ - examples/core/multiple_spin.rb
200
235
  - examples/core/nested_cancel.rb
201
- - examples/core/nested_multiple_spawn.rb
202
- - examples/core/next_tick.rb
236
+ - examples/core/nested_multiple_spin.rb
237
+ - examples/core/nested_spin.rb
238
+ - examples/core/pingpong.rb
203
239
  - examples/core/pulse.rb
204
240
  - examples/core/resource.rb
205
241
  - examples/core/resource_cancel.rb
206
242
  - examples/core/resource_delegate.rb
207
243
  - examples/core/sleep.rb
208
- - examples/core/sleep_spawn.rb
209
- - examples/core/spawn.rb
210
- - examples/core/spawn_cancel.rb
211
- - examples/core/spawn_error.rb
244
+ - examples/core/sleep_spin.rb
245
+ - examples/core/snooze.rb
246
+ - examples/core/spin.rb
247
+ - examples/core/spin_cancel.rb
248
+ - examples/core/spin_error.rb
249
+ - examples/core/spin_error_backtrace.rb
250
+ - examples/core/spin_uncaught_error.rb
212
251
  - examples/core/supervisor.rb
213
252
  - examples/core/supervisor_with_cancel_scope.rb
214
253
  - examples/core/supervisor_with_error.rb
215
254
  - examples/core/supervisor_with_manual_move_on.rb
255
+ - examples/core/suspend.rb
216
256
  - examples/core/thread.rb
217
257
  - examples/core/thread_cancel.rb
218
258
  - examples/core/thread_pool.rb
@@ -220,6 +260,7 @@ files:
220
260
  - examples/core/timeout.rb
221
261
  - examples/fs/read.rb
222
262
  - examples/http/config.ru
263
+ - examples/http/cuba.ru
223
264
  - examples/http/happy_eyeballs.rb
224
265
  - examples/http/http_client.rb
225
266
  - examples/http/http_get.rb
@@ -247,8 +288,10 @@ files:
247
288
  - examples/interfaces/redis_client.rb
248
289
  - examples/interfaces/redis_pubsub.rb
249
290
  - examples/interfaces/redis_pubsub_perf.rb
291
+ - examples/io/backticks.rb
250
292
  - examples/io/cat.rb
251
293
  - examples/io/echo_client.rb
294
+ - examples/io/echo_client_from_stdin.rb
252
295
  - examples/io/echo_pipe.rb
253
296
  - examples/io/echo_server.rb
254
297
  - examples/io/echo_server_with_timeout.rb
@@ -259,23 +302,26 @@ files:
259
302
  - examples/io/io_read.rb
260
303
  - examples/io/irb.rb
261
304
  - examples/io/net-http.rb
305
+ - examples/io/open.rb
262
306
  - examples/io/system.rb
307
+ - examples/io/tcpserver.rb
263
308
  - examples/io/tcpsocket.rb
264
- - examples/performance/perf_multi_snooze.rb
265
- - examples/performance/perf_snooze.rb
309
+ - examples/performance/multi_snooze.rb
310
+ - examples/performance/snooze.rb
311
+ - examples/performance/snooze_raw.rb
266
312
  - examples/performance/thread-vs-fiber/polyphony_server.rb
267
313
  - examples/performance/thread-vs-fiber/threaded_server.rb
268
- - ext/ev/async.c
269
- - ext/ev/child.c
270
- - ext/ev/ev.h
271
- - ext/ev/ev_ext.c
272
- - ext/ev/ev_module.c
273
- - ext/ev/extconf.rb
274
- - ext/ev/io.c
275
- - ext/ev/libev.h
276
- - ext/ev/signal.c
277
- - ext/ev/socket.c
278
- - ext/ev/timer.c
314
+ - ext/gyro/async.c
315
+ - ext/gyro/child.c
316
+ - ext/gyro/extconf.rb
317
+ - ext/gyro/gyro.c
318
+ - ext/gyro/gyro.h
319
+ - ext/gyro/gyro_ext.c
320
+ - ext/gyro/io.c
321
+ - ext/gyro/libev.h
322
+ - ext/gyro/signal.c
323
+ - ext/gyro/socket.c
324
+ - ext/gyro/timer.c
279
325
  - ext/libev/Changes
280
326
  - ext/libev/LICENSE
281
327
  - ext/libev/README
@@ -284,6 +330,7 @@ files:
284
330
  - ext/libev/ev.h
285
331
  - ext/libev/ev_epoll.c
286
332
  - ext/libev/ev_kqueue.c
333
+ - ext/libev/ev_linuxaio.c
287
334
  - ext/libev/ev_poll.c
288
335
  - ext/libev/ev_port.c
289
336
  - ext/libev/ev_select.c
@@ -291,30 +338,32 @@ files:
291
338
  - ext/libev/ev_win32.c
292
339
  - ext/libev/ev_wrap.h
293
340
  - ext/libev/test_libev_win32.c
341
+ - lib/ev_ext.bundle
294
342
  - lib/polyphony.rb
343
+ - lib/polyphony/auto_run.rb
295
344
  - lib/polyphony/core/cancel_scope.rb
296
345
  - lib/polyphony/core/channel.rb
297
346
  - lib/polyphony/core/coprocess.rb
298
347
  - lib/polyphony/core/exceptions.rb
299
- - lib/polyphony/core/fiber_pool.rb
300
348
  - lib/polyphony/core/resource_pool.rb
301
349
  - lib/polyphony/core/supervisor.rb
302
350
  - lib/polyphony/core/sync.rb
303
351
  - lib/polyphony/core/thread.rb
304
352
  - lib/polyphony/core/thread_pool.rb
305
353
  - lib/polyphony/core/throttler.rb
354
+ - lib/polyphony/extensions/core.rb
306
355
  - lib/polyphony/extensions/io.rb
307
- - lib/polyphony/extensions/kernel.rb
308
356
  - lib/polyphony/extensions/openssl.rb
309
357
  - lib/polyphony/extensions/socket.rb
310
358
  - lib/polyphony/fs.rb
311
359
  - lib/polyphony/http.rb
312
360
  - lib/polyphony/http/agent.rb
313
- - lib/polyphony/http/http1_adapter.rb
314
- - lib/polyphony/http/http2_adapter.rb
315
- - lib/polyphony/http/rack.rb
316
- - lib/polyphony/http/request.rb
317
361
  - lib/polyphony/http/server.rb
362
+ - lib/polyphony/http/server/http1.rb
363
+ - lib/polyphony/http/server/http2.rb
364
+ - lib/polyphony/http/server/http2_stream.rb
365
+ - lib/polyphony/http/server/rack.rb
366
+ - lib/polyphony/http/server/request.rb
318
367
  - lib/polyphony/line_reader.rb
319
368
  - lib/polyphony/net.rb
320
369
  - lib/polyphony/postgres.rb
@@ -322,11 +371,18 @@ files:
322
371
  - lib/polyphony/version.rb
323
372
  - lib/polyphony/websocket.rb
324
373
  - polyphony.gemspec
374
+ - test/eg.rb
375
+ - test/helper.rb
376
+ - test/run.rb
377
+ - test/test_async.rb
325
378
  - test/test_coprocess.rb
326
379
  - test/test_core.rb
327
- - test/test_ev.rb
380
+ - test/test_gyro.rb
381
+ - test/test_http_server.rb
328
382
  - test/test_io.rb
329
383
  - test/test_kernel.rb
384
+ - test/test_signal.rb
385
+ - test/test_timer.rb
330
386
  homepage: http://github.com/digital-fabric/polyphony
331
387
  licenses:
332
388
  - MIT
@@ -351,7 +407,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
351
407
  - !ruby/object:Gem::Version
352
408
  version: '0'
353
409
  requirements: []
354
- rubygems_version: 3.0.3
410
+ rubygems_version: 3.0.6
355
411
  signing_key:
356
412
  specification_version: 4
357
413
  summary: 'Polyphony: Fiber-based Concurrency for Ruby'