libuv 4.0.2 → 4.0.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 7e5dd634ac49e1992a605d48dc6c82cc33b1d564
4
- data.tar.gz: 65babf4fb27ec1dc6a36cbeef6bc04838825398e
2
+ SHA256:
3
+ metadata.gz: 1bddbc29cabe5520aac9c4a77867502f72df3eb275c026efb1a3fae8dea00e9d
4
+ data.tar.gz: ba56cf4c8e0b0231f978330a75a3d0198feadeb9b28411c71125dc17158a2898
5
5
  SHA512:
6
- metadata.gz: 55b41d35b78c90f827ab6a0ffd1819d637e8bbca93d2f455497d512c37c14591473aa462d2d74acac821aaca765ad17f38766af7f1e41128e96abd49f5e93439
7
- data.tar.gz: 44aa53c8e06c8d1411a76699d8488c12090529ff9e2f77e7e9fe6e713557edeea83b0d5737fa2bac6d96a015acd3294efbb280230ef5dc78a441f6a52be03e77
6
+ metadata.gz: 1eee24af12f90d54ce5d12e820d0a098a8e7218479af8c150a0685c544573ba206c3ff71d742599126b62c72bd95ffa0a40f4c3881fe2f283560040ef07c9125
7
+ data.tar.gz: 5d6f59bb07994961f09fca0786737ec2b15733d2967b2519a65122d0ad24d22e23bb036c48e241979d3a034459be15df592e124860de11ac7704d788c61c3385
@@ -9,8 +9,14 @@ module Libuv
9
9
 
10
10
 
11
11
  CRITICAL = ::Mutex.new
12
- THREAD_POOL = ::Concurrent::FixedThreadPool.new(8)
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, FFI::AutoPointer.new(pointer, ::Libuv::Ext.method(:loop_delete))) }
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Libuv
4
- VERSION = '4.0.2'
4
+ VERSION = '4.0.9'
5
5
  end
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.2
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-05-17 00:00:00.000000000 Z
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.6.14
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: []