Main event loop class.
Class that takes care of handling message and signal events asynchronously. *Note:* This is a native implement and therefore does not integrate with a graphical widget set main loop.
Create a new main event loop.
# File lib/dbus/bus.rb, line 667 667: def initialize 668: @buses = Hash.new 669: end
Add a bus to the list of buses to watch for events.
# File lib/dbus/bus.rb, line 672 672: def <<(bus) 673: @buses[bus.socket] = bus 674: end
Run the main loop. This is a blocking call!
# File lib/dbus/bus.rb, line 677 677: def run 678: loop do 679: ready, dum, dum = IO.select(@buses.keys) 680: ready.each do |socket| 681: b = @buses[socket] 682: b.update_buffer 683: while m = b.pop_message 684: b.process(m) 685: end 686: end 687: end 688: end