Module: GirFFIGtk::ThreadEnabler

Included in:
Gtk
Defined in:
lib/gir_ffi-gtk/base.rb

Overview

Override main to start an idle thread to allow Ruby threads to run during the main loop.

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



24
25
26
27
28
29
30
# File 'lib/gir_ffi-gtk/base.rb', line 24

def self.included base
  base.extend ClassMethods
  class << base
    alias_method :main_without_thread_enabler, :main
    alias_method :main, :main_with_thread_enabler
  end
end