class GLib::MainLoop
Overrides for GMainLoop, GLib's event loop
Constants
- EXCEPTIONS
- RUNNING_LOOPS
Public Class Methods
handle_exception(exception)
click to toggle source
# File lib/ffi-glib/main_loop.rb, line 53 def self.handle_exception(exception) current_loop = RUNNING_LOOPS.last raise exception unless current_loop EXCEPTIONS << exception current_loop.quit end
Public Instance Methods
run_with_thread_enabler()
click to toggle source
# File lib/ffi-glib/main_loop.rb, line 42 def run_with_thread_enabler ThreadEnabler.instance.setup_idle_handler if RUBY_ENGINE == "ruby" RUNNING_LOOPS << self result = run_without_thread_enabler exception = EXCEPTIONS.shift RUNNING_LOOPS.pop raise exception if exception result end
Also aliased as: run