libuv 3.2.4 → 3.3.0

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
2
  SHA1:
3
- metadata.gz: 3af8e0602a62a7d7dc6bc79f3438a6e6dfacbaef
4
- data.tar.gz: a1a72f820333a74e5ec4b829a066da634be11907
3
+ metadata.gz: '092646a6b10dd6f3b39277326714b7087447d159'
4
+ data.tar.gz: a774a2227b1b970fa38616cdd8d03c9ccc971935
5
5
  SHA512:
6
- metadata.gz: d27eee3d5005bc5c4872ad6af8cef579a56f1f34a336b8687e735ef767df79a2309db32133d2af7db0d20194079501490b224a0568a28c37cb1435ce97a82c6e
7
- data.tar.gz: e39400ee9824567f133e9cdedcfb380061838230050c6846588de5b7d8ca7e7e2e1cf6c2a6d6278a770f83d82974f06fd8c897e2c20882bf1ab87cbb203d8b19
6
+ metadata.gz: 7de8cf263154b94ca967ac1be2969e833ba3128d7f8891690a0d951562214b2ed253f57c7854297cb9011386e2157d6d496ced5344ea38df10a3cea8ad5951a5
7
+ data.tar.gz: 5992ba91e3296e41751fa3d61f6ff433f21718673b62af60e8c8a40fca47ee105e7d15875604d74b83bf9d53a2d4a73047a943105568d387179ec7304e15904f
@@ -100,6 +100,7 @@ module Libuv
100
100
 
101
101
  attach_function :version_number, :uv_version, [], :uint
102
102
  attach_function :version_string, :uv_version_string, [], :string
103
+ attach_function :loop_alive, :uv_loop_alive, [:uv_loop_t], :int
103
104
 
104
105
  attach_function :loop_new, :uv_loop_new, [], :uv_loop_t, :blocking => true
105
106
  attach_function :loop_delete, :uv_loop_delete, [:uv_loop_t], :void, :blocking => true
@@ -475,31 +475,22 @@ module Libuv
475
475
 
476
476
  # Schedule some work to be processed on the event reactor as soon as possible (thread safe)
477
477
  #
478
- # @param callback [Proc] the callback to be called on the reactor thread
479
- # @raise [ArgumentError] if block is not given
480
- def schedule(callback = nil, &block)
481
- callback ||= block
482
- assert_block(callback)
483
-
478
+ # @yield the callback to be called on the reactor thread
479
+ def schedule
484
480
  if reactor_thread?
485
- callback.call
481
+ yield
486
482
  else
487
- @run_queue << callback
483
+ @run_queue << Proc.new
488
484
  @process_queue.call
489
485
  end
490
-
491
486
  self
492
487
  end
493
488
 
494
489
  # Queue some work to be processed in the next iteration of the event reactor (thread safe)
495
490
  #
496
491
  # @param callback [Proc] the callback to be called on the reactor thread
497
- # @raise [ArgumentError] if block is not given
498
- def next_tick(callback = nil, &block)
499
- callback ||= block
500
- assert_block(callback)
501
-
502
- @run_queue << callback
492
+ def next_tick(&block)
493
+ @run_queue << block
503
494
  if reactor_thread?
504
495
  # Create a next tick timer
505
496
  if not @next_tick_scheduled
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Libuv
4
- VERSION = '3.2.4'
4
+ VERSION = '3.3.0'
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: 3.2.4
4
+ version: 3.3.0
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: 2017-11-10 00:00:00.000000000 Z
11
+ date: 2017-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi