Skip to content

Commit 56d7cd6

Browse files
committed
Limited comparison.
1 parent 55b8bab commit 56d7cd6

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

examples/limited/config.ru

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ run do |env|
3232

3333
# Simulated "fast / non-blocking" request:
3434
sleep(0.01)
35-
else
35+
elsif env["PATH_INFO"] == "/slow"
3636
# Simulated "slow / blocking" request:
3737
sleep(0.1)
3838
end

examples/limited/falcon.rb

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,19 @@
1111
include Falcon::Environment::Rack
1212

1313
scheme "http"
14-
protocol {Async::HTTP::Protocol::HTTP}
14+
protocol {Async::HTTP::Protocol::HTTP1.new(
15+
persistent: false,
16+
)}
1517

1618
# Extend the endpoint options to include the (connection) limited wrapper.
1719
endpoint_options do
18-
super().merge(wrapper: Limited::Wrapper.new)
20+
super().merge(
21+
protocol: protocol,
22+
# wrapper: Limited::Wrapper.new
23+
)
1924
end
2025

21-
count 2
26+
count 1
2227

2328
url "http://localhost:8080"
2429

gems.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
gem "bake-test-external"
5555

5656
gem "puma"
57+
gem "unicorn"
5758
gem "rackup"
5859

5960
gem "async-process"

0 commit comments

Comments
 (0)