Module: QML::Dispatchable

Included in:
Access, QML::Data::ListModel, QtObjectBase
Defined in:
lib/qml/dispatchable.rb

Overview

Dispatchable provides a handy way for asynchronous (queued) method calls which actually processed later in the event loop.

See Also:

Defined Under Namespace

Classes: Proxy

Instance Method Summary collapse

Instance Method Details

#laterProxy

Returns a proxy object for calling a method asynchronously within the event loop.

Examples:

def on_button_clicked
  Thread.new do
    result = do_task
    later.set_result_to_ui(result)
  end
end

Returns:



30
31
32
# File 'lib/qml/dispatchable.rb', line 30

def later
  Proxy.new(self)
end