8.4Class DBusPendingCall

Handle for currently open method calls.

Class DBusPendingCall

This class is returned by DBus.invoke and cannot be directly instantiated.

cancelCancels a pending call.
completedChecks if a pending call has completed.
waitWait for a pending call to complete and returns the remote method result.



Cancels a pending call.


Interrupts any wait on this call and notifies the DBUS system (and the other end) that we're not interested anymore in the call.


Checks if a pending call has completed.

DBusPendingCall.completed( [dispatch] )
dispatch set to true to force dispatching of messages (and state refresh).
ReturnTrue if the pending call can be waited on without blocking.

This method can be used to poll periodically to see if an answer has come in the meanwhile.

If the dispatch parameter is not specified, or if it's false, the network is not read again for new incoming data on the DBUS connection. This means a DBus.dispatch method or other DBUS operations must be performed elsewhere for this pending call to be updated and eventually completed. For example:

      while pending.completed()

If the parameter is set to true a single dispatch loop is performed too. Usually, it takes at least 2 dispatch loops to receive a complete answer.

      while pending.completed( true )
         // no need for conn.dispatch() to be called


Wait for a pending call to complete and returns the remote method result.

ReturnAn item or an array of items returned by the remote method.
DBusError if the method call couldn't be performed, of if the remote side returned an error.

This method is blocking (and currently not respecting VM interruption protocol).

Made with http://www.falconpl.org