libuv 3.1.8 → 3.1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/libuv/ext/types.rb +5 -0
- data/lib/libuv/reactor.rb +6 -0
- data/lib/libuv/version.rb +1 -1
- data/spec/idle_spec.rb +2 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9fa444336638ad13d76688a5cb3b497a7583b452
|
4
|
+
data.tar.gz: 5873c7caef9490d06fc0a115190b2d503fbbd7b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f6061acb31cd5b6621c2ce2b4f22984facb29f211523a9aa3ddea2dc21c237bb96a0eeeb1abb0f1c3893b8364a1a7fba876722d9a174306a23e0bbbd5cfda06
|
7
|
+
data.tar.gz: da178e269d1724cf912fa9e4b2180b2657894a151b219fcb4638e4ad34c896f2fe852024c2595fc457a843cd4d1b3bf2b7efdbb6769ef8cde8d6839e5ec03d08
|
data/lib/libuv/ext/types.rb
CHANGED
@@ -142,6 +142,11 @@ module Libuv
|
|
142
142
|
:st_birthtim, UvTimespec
|
143
143
|
end
|
144
144
|
|
145
|
+
class UvLoop < FFI::Struct
|
146
|
+
layout :data, :pointer,
|
147
|
+
:active_handles, :uint
|
148
|
+
end
|
149
|
+
|
145
150
|
typedef :pointer, :sockaddr_in
|
146
151
|
typedef :pointer, :uv_handle_t
|
147
152
|
typedef :pointer, :uv_fs_event_t
|
data/lib/libuv/reactor.rb
CHANGED
@@ -217,6 +217,12 @@ module Libuv
|
|
217
217
|
end
|
218
218
|
end
|
219
219
|
|
220
|
+
# Return the number of active handles in the event loop
|
221
|
+
def active_handles
|
222
|
+
uvloop = Ext::UvLoop.new @pointer
|
223
|
+
uvloop[:active_handles]
|
224
|
+
end
|
225
|
+
|
220
226
|
|
221
227
|
# Provides a promise notifier for receiving un-handled exceptions
|
222
228
|
#
|
data/lib/libuv/version.rb
CHANGED
data/spec/idle_spec.rb
CHANGED