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
15 16 17 18 19 20 21 22 23 |
# File 'lib/bitcoin/gui/em_gtk.rb', line 15 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
9 10 11 12 13 |
# File 'lib/bitcoin/gui/em_gtk.rb', line 9 def Gtk.queue &block GTK_PENDING_BLOCKS_LOCK.synchronize do GTK_PENDING_BLOCKS << block end end |