libvirt_async 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/libvirt_async/handle.rb +2 -2
- data/lib/libvirt_async/implementations.rb +1 -1
- data/lib/libvirt_async/timer.rb +2 -2
- data/lib/libvirt_async/version.rb +1 -1
- data/libvirt_async.gemspec +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc0738ba297733fb0f26ecb78c38bde923407c8cc0e392d95a8772a731dedf2e
|
4
|
+
data.tar.gz: 8349d0b8e34a2ce20bc5eab9d052893aded1e2f82aca9144042e6078917efb46
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b068c7251fead7d880cef6cef3a0185de0f174c7edb8c844b870bc0dda3bcd7000de8403d82ecceae4c869cfa29cc45c7a7521fcf3b491903c41c1960d93d41d
|
7
|
+
data.tar.gz: 43ff1ece2d5d6490acb7349668fb5222f359f5f902a652b85367ee55a025d4f9cf7b03bbd60ad3a234000735d8f78e9d83d41666adaf740799e5929c2da3bf4b
|
data/lib/libvirt_async/handle.rb
CHANGED
@@ -2,7 +2,7 @@ module LibvirtAsync
|
|
2
2
|
class Handle
|
3
3
|
# Represents an event handle (usually a file descriptor). When an event
|
4
4
|
# happens to the handle, we dispatch the event to libvirt via
|
5
|
-
# Libvirt::
|
5
|
+
# Libvirt::Event.invoke_handle_callback (feeding it the handle_id we returned
|
6
6
|
# from add_handle, the file descriptor, the new events, and the opaque
|
7
7
|
# data that libvirt gave us earlier).
|
8
8
|
|
@@ -117,7 +117,7 @@ module LibvirtAsync
|
|
117
117
|
|
118
118
|
task = Util.create_task do
|
119
119
|
dbg { "#{self.class}#dispatch async starts handle_id=#{handle_id} events=#{events}, fd=#{fd}" }
|
120
|
-
Libvirt::
|
120
|
+
Libvirt::Event.invoke_handle_callback(handle_id, fd, events, opaque)
|
121
121
|
dbg { "#{self.class}#dispatch async ends handle_id=#{handle_id} received_events=#{events}, fd=#{fd}" }
|
122
122
|
end
|
123
123
|
dbg { "#{self.class}#dispatch invokes fiber=0x#{task.fiber.object_id.to_s(16)} handle_id=#{handle_id}, events=#{events}, fd=#{fd}" }
|
@@ -62,7 +62,7 @@ module LibvirtAsync
|
|
62
62
|
def register_implementations
|
63
63
|
dbg { "#{self.class}#register_implementations" }
|
64
64
|
|
65
|
-
Libvirt::
|
65
|
+
Libvirt::Event.register(
|
66
66
|
method(:add_handle).to_proc,
|
67
67
|
method(:update_handle).to_proc,
|
68
68
|
method(:remove_handle).to_proc,
|
data/lib/libvirt_async/timer.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module LibvirtAsync
|
2
2
|
class Timer
|
3
3
|
# Represents a When a timer expires, we dispatch the event to
|
4
|
-
# libvirt via Libvirt::
|
4
|
+
# libvirt via Libvirt::Event.invoke_timeout_callback (feeding it the timer_id
|
5
5
|
# we returned from add_timer and the opaque data that libvirt gave us
|
6
6
|
# earlier).
|
7
7
|
|
@@ -114,7 +114,7 @@ module LibvirtAsync
|
|
114
114
|
|
115
115
|
task = Util.create_task do
|
116
116
|
dbg { "#{self.class}#dispatch async starts timer_id=#{timer_id}, interval=#{interval}" }
|
117
|
-
Libvirt::
|
117
|
+
Libvirt::Event.invoke_timeout_callback(timer_id, opaque)
|
118
118
|
dbg { "#{self.class}#dispatch async async ends timer_id=#{timer_id}, interval=#{interval}" }
|
119
119
|
end
|
120
120
|
|
data/libvirt_async.gemspec
CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
26
26
|
spec.require_paths = ['lib']
|
27
27
|
|
28
|
-
spec.add_dependency '
|
28
|
+
spec.add_dependency 'libvirt_ffi'
|
29
29
|
spec.add_dependency 'async', '~> 1.24'
|
30
30
|
spec.add_dependency 'activesupport'
|
31
31
|
end
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: libvirt_async
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Denis Talakevich
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-01-
|
11
|
+
date: 2020-01-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: libvirt_ffi
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0
|
19
|
+
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0
|
26
|
+
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: async
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|