Class: GLib::MainLoop::ThreadEnabler
- Inherits:
-
Object
- Object
- GLib::MainLoop::ThreadEnabler
- Includes:
- Singleton
- Defined in:
- lib/ffi-glib/main_loop.rb
Overview
Class encapsulationg logic for running an idle handler to make Ruby code run during GLib’s event loop.
Constant Summary collapse
- FRAMERATE =
25
- DEFAULT_TIMEOUT =
1000 / FRAMERATE
Instance Method Summary collapse
-
#initialize(timeout = DEFAULT_TIMEOUT) ⇒ ThreadEnabler
constructor
A new instance of ThreadEnabler.
- #setup_idle_handler ⇒ Object
Constructor Details
#initialize(timeout = DEFAULT_TIMEOUT) ⇒ ThreadEnabler
Returns a new instance of ThreadEnabler.
18 19 20 |
# File 'lib/ffi-glib/main_loop.rb', line 18 def initialize(timeout = DEFAULT_TIMEOUT) @timeout = timeout end |