Skip to content

Switch to async/http/internet/instance #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions rack-async-http-falcon-graphql-batch/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,27 @@ GEM
async-container (0.16.8)
async (~> 1.0)
async-io (~> 1.26)
async-http (0.54.1)
async-http (0.56.1)
async (~> 1.25)
async-io (~> 1.28)
async-pool (~> 0.2)
protocol-http (~> 0.21.0)
protocol-http1 (~> 0.13.0)
protocol-http (~> 0.22.0)
protocol-http1 (~> 0.14.0)
protocol-http2 (~> 0.14.0)
async-http-cache (0.3.0)
async-http (~> 0.53)
async-http-cache (0.4.0)
async-http (~> 0.56)
async-io (1.30.2)
async (~> 1.14)
async-pool (0.3.5)
async (~> 1.25)
build-environment (1.13.0)
console (1.11.1)
fiber-local
falcon (0.37.3)
falcon (0.38.0)
async (~> 1.13)
async-container (~> 0.16.0)
async-http (~> 0.54.0)
async-http-cache (~> 0.3.0)
async-http (~> 0.56.0)
async-http-cache (~> 0.4.0)
async-io (~> 1.22)
build-environment (~> 1.13)
bundler
Expand All @@ -49,9 +49,9 @@ GEM
samovar (~> 2.1)
promise.rb (0.7.4)
protocol-hpack (1.4.2)
protocol-http (0.21.0)
protocol-http1 (0.13.2)
protocol-http (~> 0.19)
protocol-http (0.22.0)
protocol-http1 (0.14.0)
protocol-http (~> 0.22)
protocol-http2 (0.14.2)
protocol-hpack (~> 1.4)
protocol-http (~> 0.18)
Expand Down
7 changes: 1 addition & 6 deletions rack-async-http-falcon-graphql-batch/async_loader.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
require "async"
require "async/barrier"
require "async/http/internet"
require "thread/local"

class Async::HTTP::Internet
extend Thread::Local
end
require "async/http/internet/instance"

class AsyncLoader < GraphQL::Batch::Loader
def perform(urls)
Expand Down
22 changes: 11 additions & 11 deletions rack-async-http-falcon-graphql-dataloader/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,27 @@ GEM
async-container (0.16.8)
async (~> 1.0)
async-io (~> 1.26)
async-http (0.54.1)
async-http (0.56.1)
async (~> 1.25)
async-io (~> 1.28)
async-pool (~> 0.2)
protocol-http (~> 0.21.0)
protocol-http1 (~> 0.13.0)
protocol-http (~> 0.22.0)
protocol-http1 (~> 0.14.0)
protocol-http2 (~> 0.14.0)
async-http-cache (0.3.0)
async-http (~> 0.53)
async-http-cache (0.4.0)
async-http (~> 0.56)
async-io (1.30.2)
async (~> 1.14)
async-pool (0.3.5)
async (~> 1.25)
build-environment (1.13.0)
console (1.11.1)
fiber-local
falcon (0.37.3)
falcon (0.38.0)
async (~> 1.13)
async-container (~> 0.16.0)
async-http (~> 0.54.0)
async-http-cache (~> 0.3.0)
async-http (~> 0.56.0)
async-http-cache (~> 0.4.0)
async-io (~> 1.22)
build-environment (~> 1.13)
bundler
Expand All @@ -45,9 +45,9 @@ GEM
console (~> 1.8)
samovar (~> 2.1)
protocol-hpack (1.4.2)
protocol-http (0.21.0)
protocol-http1 (0.13.2)
protocol-http (~> 0.19)
protocol-http (0.22.0)
protocol-http1 (0.14.0)
protocol-http (~> 0.22)
protocol-http2 (0.14.2)
protocol-hpack (~> 1.4)
protocol-http (~> 0.18)
Expand Down
7 changes: 1 addition & 6 deletions rack-async-http-falcon-graphql-dataloader/async_loader.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
require "async"
require "async/barrier"
require "async/http/internet"
require "async/http/internet/instance"
require "kernel/sync"
require "thread/local"

class Async::HTTP::Internet
extend Thread::Local
end

class AsyncLoader < GraphQL::Dataloader::Source
def fetch(urls)
Expand Down
22 changes: 11 additions & 11 deletions rack-async-http-falcon-graphql-lazy-resolve/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,27 @@ GEM
async-container (0.16.8)
async (~> 1.0)
async-io (~> 1.26)
async-http (0.54.1)
async-http (0.56.1)
async (~> 1.25)
async-io (~> 1.28)
async-pool (~> 0.2)
protocol-http (~> 0.21.0)
protocol-http1 (~> 0.13.0)
protocol-http (~> 0.22.0)
protocol-http1 (~> 0.14.0)
protocol-http2 (~> 0.14.0)
async-http-cache (0.3.0)
async-http (~> 0.53)
async-http-cache (0.4.0)
async-http (~> 0.56)
async-io (1.30.2)
async (~> 1.14)
async-pool (0.3.5)
async (~> 1.25)
build-environment (1.13.0)
console (1.11.1)
fiber-local
falcon (0.37.3)
falcon (0.38.0)
async (~> 1.13)
async-container (~> 0.16.0)
async-http (~> 0.54.0)
async-http-cache (~> 0.3.0)
async-http (~> 0.56.0)
async-http-cache (~> 0.4.0)
async-io (~> 1.22)
build-environment (~> 1.13)
bundler
Expand All @@ -45,9 +45,9 @@ GEM
console (~> 1.8)
samovar (~> 2.1)
protocol-hpack (1.4.2)
protocol-http (0.21.0)
protocol-http1 (0.13.2)
protocol-http (~> 0.19)
protocol-http (0.22.0)
protocol-http1 (0.14.0)
protocol-http (~> 0.22)
protocol-http2 (0.14.2)
protocol-hpack (~> 1.4)
protocol-http (~> 0.18)
Expand Down
13 changes: 2 additions & 11 deletions rack-async-http-falcon-graphql-lazy-resolve/query.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
require "async/http/internet"
require "thread/local"
require "async/http/internet/instance"

class Query < GraphQL::Schema::Object
field :one, String, null: false
Expand All @@ -18,16 +17,8 @@ def three
Async { delay_2_data["url"] }
end

module Internet
extend Thread::Local

def self.local
Async::HTTP::Internet.new
end
end

def internet
Internet.instance
Async::HTTP::Internet.instance
end

def delay_1_semaphore
Expand Down
22 changes: 11 additions & 11 deletions rack-async-http-falcon-graphql/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,27 @@ GEM
async-container (0.16.8)
async (~> 1.0)
async-io (~> 1.26)
async-http (0.54.1)
async-http (0.56.1)
async (~> 1.25)
async-io (~> 1.28)
async-pool (~> 0.2)
protocol-http (~> 0.21.0)
protocol-http1 (~> 0.13.0)
protocol-http (~> 0.22.0)
protocol-http1 (~> 0.14.0)
protocol-http2 (~> 0.14.0)
async-http-cache (0.3.0)
async-http (~> 0.53)
async-http-cache (0.4.0)
async-http (~> 0.56)
async-io (1.30.2)
async (~> 1.14)
async-pool (0.3.5)
async (~> 1.25)
build-environment (1.13.0)
console (1.11.1)
fiber-local
falcon (0.37.3)
falcon (0.38.0)
async (~> 1.13)
async-container (~> 0.16.0)
async-http (~> 0.54.0)
async-http-cache (~> 0.3.0)
async-http (~> 0.56.0)
async-http-cache (~> 0.4.0)
async-io (~> 1.22)
build-environment (~> 1.13)
bundler
Expand All @@ -49,9 +49,9 @@ GEM
samovar (~> 2.1)
promise.rb (0.7.4)
protocol-hpack (1.4.2)
protocol-http (0.21.0)
protocol-http1 (0.13.2)
protocol-http (~> 0.19)
protocol-http (0.22.0)
protocol-http1 (0.14.0)
protocol-http (~> 0.22)
protocol-http2 (0.14.2)
protocol-hpack (~> 1.4)
protocol-http (~> 0.18)
Expand Down
7 changes: 1 addition & 6 deletions rack-async-http-falcon-graphql/async_loader.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
require "async"
require "async/barrier"
require "async/http/internet"
require "thread/local"

class Async::HTTP::Internet
extend Thread::Local
end
require "async/http/internet/instance"

class AsyncLoader < GraphQL::Batch::Loader
def perform(urls)
Expand Down
12 changes: 6 additions & 6 deletions rack-async-http-puma-graphql/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ GEM
console (~> 1.10)
nio4r (~> 2.3)
timers (~> 4.1)
async-http (0.55.0)
async-http (0.56.1)
async (~> 1.25)
async-io (~> 1.28)
async-pool (~> 0.2)
protocol-http (~> 0.21.0)
protocol-http1 (~> 0.13.0)
protocol-http (~> 0.22.0)
protocol-http1 (~> 0.14.0)
protocol-http2 (~> 0.14.0)
async-io (1.30.2)
async (~> 1.14)
Expand All @@ -26,9 +26,9 @@ GEM
nio4r (2.5.7)
promise.rb (0.7.4)
protocol-hpack (1.4.2)
protocol-http (0.21.0)
protocol-http1 (0.13.2)
protocol-http (~> 0.19)
protocol-http (0.22.0)
protocol-http1 (0.14.0)
protocol-http (~> 0.22)
protocol-http2 (0.14.2)
protocol-hpack (~> 1.4)
protocol-http (~> 0.18)
Expand Down
7 changes: 1 addition & 6 deletions rack-async-http-puma-graphql/async_loader.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
require "async"
require "async/barrier"
require "async/http/internet"
require "thread/local"
require "async/http/internet/instance"
require "kernel/sync"

class Async::HTTP::Internet
extend Thread::Local
end

class AsyncLoader < GraphQL::Batch::Loader
def perform(urls)
Sync do
Expand Down
22 changes: 11 additions & 11 deletions rails-async-http-falcon-graphql-batch/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ GEM
async-container (0.16.8)
async (~> 1.0)
async-io (~> 1.26)
async-http (0.54.1)
async-http (0.56.1)
async (~> 1.25)
async-io (~> 1.28)
async-pool (~> 0.2)
protocol-http (~> 0.21.0)
protocol-http1 (~> 0.13.0)
protocol-http (~> 0.22.0)
protocol-http1 (~> 0.14.0)
protocol-http2 (~> 0.14.0)
async-http-cache (0.3.0)
async-http (~> 0.53)
async-http-cache (0.4.0)
async-http (~> 0.56)
async-io (1.30.2)
async (~> 1.14)
async-pool (0.3.5)
Expand All @@ -87,11 +87,11 @@ GEM
fiber-local
crass (1.0.6)
erubi (1.10.0)
falcon (0.37.3)
falcon (0.38.0)
async (~> 1.13)
async-container (~> 0.16.0)
async-http (~> 0.54.0)
async-http-cache (~> 0.3.0)
async-http (~> 0.56.0)
async-http-cache (~> 0.4.0)
async-io (~> 1.22)
build-environment (~> 1.13)
bundler
Expand Down Expand Up @@ -129,9 +129,9 @@ GEM
samovar (~> 2.1)
promise.rb (0.7.4)
protocol-hpack (1.4.2)
protocol-http (0.21.0)
protocol-http1 (0.13.2)
protocol-http (~> 0.19)
protocol-http (0.22.0)
protocol-http1 (0.14.0)
protocol-http (~> 0.22)
protocol-http2 (0.14.2)
protocol-hpack (~> 1.4)
protocol-http (~> 0.18)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
require "async"
require "async/barrier"
require "async/http/internet"
require "thread/local"

class Async::HTTP::Internet
extend Thread::Local
end
require "async/http/internet/instance"

class AsyncLoader < GraphQL::Batch::Loader
def perform(urls)
Expand Down