async-container 0.2.2 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/async/container.rb +8 -0
- data/lib/async/container/version.rb +1 -1
- data/spec/async/container_spec.rb +4 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 9ebb8de7090ed5a5d23691d8571baeb429b48a9f074732c236224e070beb494c
|
4
|
+
data.tar.gz: 3146ab6d57971fd5ac44649c866e9cdaade193d42281e1cdd6c2bfc4b95b134a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 325838cec3b84c9d3f90f4d79dd7fb927275edbd547f9205bac7e31c8dd0e02aaf7c7030d82223f2c05a6b3ee2ef1e889b824640f8e81f8c9f307b40d751e12b
|
7
|
+
data.tar.gz: 7ffee495a8907695266b22696a8ecece4a2beb73b5ba392ad37332b1671bbb6ab6d063aec96ce4410524c2afef8dec0f66ea141a8bdcbcd64ee4cb24340fffe3
|
data/lib/async/container.rb
CHANGED
@@ -20,11 +20,19 @@
|
|
20
20
|
|
21
21
|
require_relative 'container/threaded'
|
22
22
|
|
23
|
+
require 'etc'
|
24
|
+
|
23
25
|
module Async
|
24
26
|
# Manages a reactor within one or more threads.
|
25
27
|
module Container
|
26
28
|
def self.new(**options, &block)
|
27
29
|
Threaded.new(**options, &block)
|
28
30
|
end
|
31
|
+
|
32
|
+
def self.hardware_concurrency
|
33
|
+
Etc.nprocessors
|
34
|
+
rescue
|
35
|
+
2
|
36
|
+
end
|
29
37
|
end
|
30
38
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: async-container
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-03-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async
|
@@ -124,7 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
124
124
|
version: '0'
|
125
125
|
requirements: []
|
126
126
|
rubyforge_project:
|
127
|
-
rubygems_version: 2.6
|
127
|
+
rubygems_version: 2.7.6
|
128
128
|
signing_key:
|
129
129
|
specification_version: 4
|
130
130
|
summary: Async is an asynchronous I/O framework based on nio4r.
|