libuv 4.0.2 → 4.0.9
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.
- checksums.yaml +5 -5
- data/lib/libuv/reactor.rb +19 -3
- data/lib/libuv/version.rb +1 -1
- metadata +4 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 1bddbc29cabe5520aac9c4a77867502f72df3eb275c026efb1a3fae8dea00e9d
|
4
|
+
data.tar.gz: ba56cf4c8e0b0231f978330a75a3d0198feadeb9b28411c71125dc17158a2898
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1eee24af12f90d54ce5d12e820d0a098a8e7218479af8c150a0685c544573ba206c3ff71d742599126b62c72bd95ffa0a40f4c3881fe2f283560040ef07c9125
|
7
|
+
data.tar.gz: 5d6f59bb07994961f09fca0786737ec2b15733d2967b2519a65122d0ad24d22e23bb036c48e241979d3a034459be15df592e124860de11ac7704d788c61c3385
|
data/lib/libuv/reactor.rb
CHANGED
@@ -9,8 +9,14 @@ module Libuv
|
|
9
9
|
|
10
10
|
|
11
11
|
CRITICAL = ::Mutex.new
|
12
|
-
|
13
|
-
|
12
|
+
LIBUV_MIN_POOL = ENV['LIBUV_MIN_POOL'] || 8
|
13
|
+
LIBUV_MAX_POOL = ENV['LIBUV_MAX_POOL'] || 40
|
14
|
+
LIBUV_MAX_QUEUE = ENV['LIBUV_MAX_QUEUE'] || 50000
|
15
|
+
THREAD_POOL = ::Concurrent::ThreadPoolExecutor.new(
|
16
|
+
min_threads: LIBUV_MIN_POOL,
|
17
|
+
max_threads: LIBUV_MAX_POOL,
|
18
|
+
max_queue: LIBUV_MAX_QUEUE
|
19
|
+
)
|
14
20
|
|
15
21
|
module ClassMethods
|
16
22
|
# Get default reactor
|
@@ -40,7 +46,17 @@ module Libuv
|
|
40
46
|
#
|
41
47
|
# @return [::Libuv::Reactor]
|
42
48
|
def create(pointer)
|
43
|
-
allocate.tap { |i| i.send(:initialize,
|
49
|
+
reactor = allocate.tap { |i| i.send(:initialize, pointer) }
|
50
|
+
if CRITICAL.owned?
|
51
|
+
@reactors ||= []
|
52
|
+
@reactors << reactor
|
53
|
+
else
|
54
|
+
CRITICAL.synchronize {
|
55
|
+
@reactors ||= []
|
56
|
+
@reactors << reactor
|
57
|
+
}
|
58
|
+
end
|
59
|
+
reactor
|
44
60
|
end
|
45
61
|
|
46
62
|
# Checks for the existence of a reactor on the current thread
|
data/lib/libuv/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: libuv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen von Takach
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-08-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|
@@ -112,7 +112,6 @@ files:
|
|
112
112
|
- Rakefile
|
113
113
|
- ext/README.md
|
114
114
|
- ext/Rakefile
|
115
|
-
- ext/libuv.dll
|
116
115
|
- ext/libuv/.github/ISSUE_TEMPLATE.md
|
117
116
|
- ext/libuv/.gitignore
|
118
117
|
- ext/libuv/.mailmap
|
@@ -601,25 +600,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
601
600
|
version: '0'
|
602
601
|
requirements: []
|
603
602
|
rubyforge_project:
|
604
|
-
rubygems_version: 2.
|
603
|
+
rubygems_version: 2.7.7
|
605
604
|
signing_key:
|
606
605
|
specification_version: 4
|
607
606
|
summary: libuv bindings for Ruby
|
608
|
-
test_files:
|
609
|
-
- spec/async_spec.rb
|
610
|
-
- spec/coroutines_spec.rb
|
611
|
-
- spec/cpu_spec.rb
|
612
|
-
- spec/defer_spec.rb
|
613
|
-
- spec/dns_spec.rb
|
614
|
-
- spec/dsl_spec.rb
|
615
|
-
- spec/filesystem_spec.rb
|
616
|
-
- spec/idle_spec.rb
|
617
|
-
- spec/pipe_spec.rb
|
618
|
-
- spec/spawn_spec.rb
|
619
|
-
- spec/tcp_spec.rb
|
620
|
-
- spec/test.sh
|
621
|
-
- spec/test_fail.sh
|
622
|
-
- spec/test_read.sh
|
623
|
-
- spec/timer_spec.rb
|
624
|
-
- spec/udp_spec.rb
|
625
|
-
- spec/zen_spec.rb
|
607
|
+
test_files: []
|