ruby-dbus-openplacos 0.6.1 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/dbus/bus.rb +16 -10
- metadata +5 -5
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.6.
|
1
|
+
0.6.2
|
data/lib/dbus/bus.rb
CHANGED
@@ -12,6 +12,7 @@ require 'socket'
|
|
12
12
|
require 'thread'
|
13
13
|
require 'singleton'
|
14
14
|
require 'fcntl'
|
15
|
+
require 'timeout'
|
15
16
|
|
16
17
|
# = D-Bus main module
|
17
18
|
#
|
@@ -837,7 +838,7 @@ module DBus
|
|
837
838
|
|
838
839
|
# Get the remote bus.
|
839
840
|
def initialize socket_name
|
840
|
-
super(socket_name)
|
841
|
+
super(socket_name, ENV["DBUS_THREADED_ACCESS"] || false)
|
841
842
|
connect
|
842
843
|
send_hello
|
843
844
|
end
|
@@ -930,22 +931,27 @@ module DBus
|
|
930
931
|
@buses_thread_id.push th.object_id
|
931
932
|
@buses_thread.push th
|
932
933
|
end
|
934
|
+
|
935
|
+
popping_thread = Thread.new{
|
936
|
+
@quit_queue.pop
|
937
|
+
}
|
938
|
+
popping_thread.join # main thread - sleep for this thread waiting for poping thread
|
933
939
|
|
934
|
-
|
935
|
-
|
936
|
-
#~ while not @buses_thread_id.empty?
|
937
|
-
#~ id = @thread_as_quit.pop
|
938
|
-
#~ @buses_thread_id.delete(id)
|
939
|
-
#~ end
|
940
|
-
|
941
|
-
else
|
940
|
+
else
|
942
941
|
@buses.each_value do |b|
|
943
942
|
while m = b.pop_message
|
944
943
|
b.process(m)
|
945
944
|
end
|
946
945
|
end
|
947
946
|
while not @quitting and not @buses.empty?
|
948
|
-
|
947
|
+
io_ready = false
|
948
|
+
while not io_ready and not @quitting and not @buses.empty? do
|
949
|
+
ready, dum, dum = IO.select(@buses.keys, nil, nil, 0.1)
|
950
|
+
io_ready = !(ready.nil? or ready.first.nil?)
|
951
|
+
end
|
952
|
+
|
953
|
+
next if ready.nil?
|
954
|
+
|
949
955
|
ready.each do |socket|
|
950
956
|
b = @buses[socket]
|
951
957
|
begin
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-dbus-openplacos
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 3
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 6
|
9
|
-
-
|
10
|
-
version: 0.6.
|
9
|
+
- 2
|
10
|
+
version: 0.6.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Openplacos Team
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-05-07 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|
@@ -114,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
114
114
|
requirements: []
|
115
115
|
|
116
116
|
rubyforge_project:
|
117
|
-
rubygems_version: 1.
|
117
|
+
rubygems_version: 1.5.3
|
118
118
|
signing_key:
|
119
119
|
specification_version: 3
|
120
120
|
summary: Fork from ruby-dbus
|