async 1.24.1 → 1.24.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -0
  3. data/Gemfile +2 -0
  4. data/README.md +2 -2
  5. data/Rakefile +2 -0
  6. data/benchmark/async_vs_lightio.rb +1 -0
  7. data/benchmark/fiber_count.rb +1 -0
  8. data/benchmark/rubies/benchmark.rb +1 -0
  9. data/benchmark/thread_count.rb +1 -0
  10. data/benchmark/thread_vs_fiber.rb +1 -0
  11. data/examples/async_method.rb +1 -0
  12. data/examples/callback/loop.rb +1 -0
  13. data/examples/capture/capture.rb +1 -0
  14. data/examples/fibers.rb +1 -1
  15. data/examples/queue/producer.rb +1 -0
  16. data/examples/sleep_sort.rb +1 -0
  17. data/examples/stop/condition.rb +1 -0
  18. data/examples/stop/sleep.rb +1 -0
  19. data/lib/async.rb +2 -0
  20. data/lib/async/barrier.rb +2 -0
  21. data/lib/async/clock.rb +2 -0
  22. data/lib/async/condition.rb +2 -0
  23. data/lib/async/debug/monitor.rb +2 -0
  24. data/lib/async/debug/selector.rb +2 -0
  25. data/lib/async/logger.rb +2 -0
  26. data/lib/async/node.rb +2 -0
  27. data/lib/async/notification.rb +2 -0
  28. data/lib/async/queue.rb +2 -0
  29. data/lib/async/reactor.rb +2 -0
  30. data/lib/async/semaphore.rb +2 -0
  31. data/lib/async/task.rb +2 -0
  32. data/lib/async/version.rb +3 -1
  33. data/lib/async/wrapper.rb +2 -0
  34. data/lib/kernel/async.rb +2 -0
  35. data/lib/kernel/sync.rb +2 -0
  36. data/spec/async/barrier_spec.rb +2 -0
  37. data/spec/async/chainable_async_examples.rb +1 -0
  38. data/spec/async/clock_spec.rb +2 -0
  39. data/spec/async/condition_examples.rb +2 -0
  40. data/spec/async/condition_spec.rb +2 -0
  41. data/spec/async/logger_spec.rb +2 -0
  42. data/spec/async/node_spec.rb +2 -0
  43. data/spec/async/notification_spec.rb +2 -0
  44. data/spec/async/performance_spec.rb +2 -0
  45. data/spec/async/queue_spec.rb +2 -0
  46. data/spec/async/reactor/nested_spec.rb +2 -0
  47. data/spec/async/reactor_spec.rb +2 -0
  48. data/spec/async/semaphore_spec.rb +2 -0
  49. data/spec/async/task_spec.rb +2 -0
  50. data/spec/async/wrapper_spec.rb +2 -0
  51. data/spec/async_spec.rb +2 -0
  52. data/spec/enumerator_spec.rb +2 -0
  53. data/spec/kernel/async_spec.rb +2 -0
  54. data/spec/kernel/sync_spec.rb +2 -0
  55. data/spec/spec_helper.rb +1 -0
  56. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cfe2cb7d16cfd777471b8c82be6f67f26dad0864d4faf7df21864d40d686da6e
4
- data.tar.gz: ac5bd63fe7a7fe91ee30e4ccd95812e7bbc1b32c6822b83ad299212b8f76be8a
3
+ metadata.gz: 1abae91f943de66c2b76625d034a0b0a16beefbfa1b5d02f920e3b8fe4ee56b0
4
+ data.tar.gz: 62947ba422281ad590acba11610f4216e9b79c51bcad87407e4aa11fd602e218
5
5
  SHA512:
6
- metadata.gz: 20928dd5b7a45666911e3461ae1a3512ee818851eefdd08eacfec8b494322df6d7832d873f9b18f09eed2bc180c370632ebe7e2aba524459988630f0ac731a21
7
- data.tar.gz: 43669775131e79fd15ed8cb77ef299763f3cbd5e11e2f506748e09a5139f0b79e4eb2f8dac5deb0ef0404aad49c8b15900338deec95d6c7a59bf9477a70fdca9
6
+ metadata.gz: de5796a4402ea91aa31dfb5fa24f634cc86855687650d9faa1b088696325d5c807837d981e063dd0b2e5ff1111d763153a9477bc717411afe402217d9ac3cc0e
7
+ data.tar.gz: cfeca12657ffb34219edd03ce2f1fd335c45fdbd3a661caca5db6972649304b8179850cf2fbe6ce23efa5f8abfd730259cc80dcfb0a4f29c35bd334db0be23a9
@@ -20,6 +20,7 @@ matrix:
20
20
  - rvm: 2.4
21
21
  - rvm: 2.5
22
22
  - rvm: 2.6
23
+ - rvm: 2.7
23
24
  - rvm: 2.6
24
25
  gemfile: gems/event.gemfile
25
26
  - rvm: 2.6
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  gemspec
data/README.md CHANGED
@@ -5,7 +5,7 @@ Async is a composable asynchronous I/O framework for Ruby based on [nio4r] and [
5
5
  [timers]: https://github.com/socketry/timers
6
6
  [nio4r]: https://github.com/socketry/nio4r
7
7
 
8
- [![Build Status](https://secure.travis-ci.com/socketry/async.svg)](http://travis-ci.com/socketry/async)
8
+ [![Build Status](https://travis-ci.com/socketry/async.svg?branch=master)](https://travis-ci.com/socketry/async)
9
9
  [![Code Climate](https://codeclimate.com/github/socketry/async.svg)](https://codeclimate.com/github/socketry/async)
10
10
  [![Coverage Status](https://coveralls.io/repos/socketry/async/badge.svg)](https://coveralls.io/r/socketry/async)
11
11
  [![Gitter](https://badges.gitter.im/join.svg)](https://gitter.im/socketry/async)
@@ -355,7 +355,7 @@ A `parent:` in this context is anything that responds to `#async` in the same wa
355
355
 
356
356
  ### Projects Using Async
357
357
 
358
- - [ciri](https://github.com/ciri-ethereum/ciri) - An Ethereum implementation written in Ruby.
358
+ - [ciri](https://github.com/ciri-ethereum/ciri) An Ethereum implementation written in Ruby.
359
359
  - [falcon](https://github.com/socketry/falcon) — A rack compatible server built on top of `async-http`.
360
360
  - [rubydns](https://github.com/ioquatix/rubydns) — A easy to use Ruby DNS server.
361
361
  - [slack-ruby-bot](https://github.com/slack-ruby/slack-ruby-bot) — A client for making slack bots.
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "bundler/gem_tasks"
2
4
  require "rspec/core/rake_task"
3
5
 
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  require 'async'
4
5
  require 'lightio'
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
 
2
3
  fibers = []
3
4
 
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  require 'socket'
4
5
  require 'fiber'
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
 
2
3
  threads = []
3
4
 
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  # Copyright, 2019, by Samuel G. D. Williams. <http://www.codeotaku.com>
4
5
  #
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  require_relative '../lib/async'
4
5
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
 
2
3
  require 'async/reactor'
3
4
 
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  require 'irb'
4
5
  require 'console'
@@ -1,4 +1,4 @@
1
-
1
+ # frozen_string_literal: true
2
2
 
3
3
  require 'fiber'
4
4
 
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  require 'async'
4
5
  require 'async/queue'
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  require_relative '../lib/async'
4
5
 
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  # require 'async'; require 'async/queue'
4
5
 
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  require_relative '../../lib/async'
4
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright, 2017, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
4
  #
3
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright, 2019, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
4
  #
3
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
4
  #
3
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright, 2017, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
4
  #
3
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
4
  #
3
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
4
  #
3
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright, 2017, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
4
  #
3
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright, 2017, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
4
  #
3
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright, 2017, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
4
  #
3
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright, 2017, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
4
  #
3
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright, 2017, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
4
  #
3
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright, 2017, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
4
  #
3
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright, 2017, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
4
  #
3
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright, 2017, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
4
  #
3
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -19,5 +21,5 @@
19
21
  # THE SOFTWARE.
20
22
 
21
23
  module Async
22
- VERSION = "1.24.1"
24
+ VERSION = "1.24.2"
23
25
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright, 2017, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
4
  #
3
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright, 2017, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
4
  #
3
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright, 2017, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
4
  #
3
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright, 2019, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
4
  #
3
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
 
2
3
  RSpec.shared_examples 'chainable async' do
3
4
  let(:parent) {double}
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
4
  #
3
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
4
  #
3
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright, 2017, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
4
  #
3
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright, 2017, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
4
  #
3
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright, 2017, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
4
  #
3
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright, 2017, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
4
  #
3
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright, 2019, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
4
  #
3
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright, 2017, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
4
  #
3
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright, 2017, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
4
  #
3
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright, 2017, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
4
  #
3
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
4
  #
3
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright, 2017, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
4
  #
3
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright, 2017, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
4
  #
3
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright, 2019, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
4
  #
3
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
4
  # Copyright, 2018, by Sokolov Yura aka funny-falcon
3
5
  #
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright, 2019, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
4
  #
3
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright, 2019, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
4
  #
3
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
 
2
3
  require "covered/rspec"
3
4
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: async
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.24.1
4
+ version: 1.24.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-28 00:00:00.000000000 Z
11
+ date: 2020-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nio4r