Module: Gtk
- Defined in:
- lib/bitcoin/gui/em_gtk.rb
Constant Summary collapse
- GTK_PENDING_BLOCKS =
[]
- GTK_PENDING_BLOCKS_LOCK =
Monitor.new
Class Method Summary collapse
Class Method Details
.main_iteration_with_queue ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/bitcoin/gui/em_gtk.rb', line 13 def Gtk.main_iteration_with_queue GTK_PENDING_BLOCKS_LOCK.synchronize do for block in GTK_PENDING_BLOCKS block.call end GTK_PENDING_BLOCKS.clear end Gtk.main_iteration while Gtk.events_pending end |
.queue(&block) ⇒ Object
7 8 9 10 11 |
# File 'lib/bitcoin/gui/em_gtk.rb', line 7 def Gtk.queue &block GTK_PENDING_BLOCKS_LOCK.synchronize do GTK_PENDING_BLOCKS << block end end |