| Trees | Indices | Help |
|
|---|
|
|
object --+
|
EventLoop
An event loop, intended to be compatible with the GLib event loop. Call the iteration method in order to execute one iteration of the loop. The idle_add and timeout_add methods serve as thread-safe means to interact with the loop's thread.
|
|||
| _child_callback_class | |||
| _idle_callback_class | |||
| _io_handler_class | |||
| _timeout_handler_class | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
| int |
|
||
|
|||
|
|||
|
|||
| int |
|
||
|
|||
|
Inherited from |
|||
|
|||
supports_multiprocessing = True
|
|||
_sigchld_interval = 250
|
|||
|
|||
|
Inherited from |
|||
|
|||
x.__init__(...) initializes x; see help(type(x)) for signature
|
Generate a new source id. This method is thread-safe. |
All poll() calls pass through here. The poll events are added directly to self._poll_event_queue. In order to avoid endless blocking, this raises StopIteration if timeout is None and there are no file descriptors to poll. |
Like glib.MainContext.iteration(), runs a single iteration. In order
to avoid blocking forever when may_block is True (the default),
callers must be careful to ensure that at least one of the following
conditions is met:
1) An event source or timeout is registered which is guaranteed
to trigger at least on event (a call to an idle function
only counts as an event if it returns a False value which
causes it to stop being called)
2) Another thread is guaranteed to call one of the thread-safe
methods which notify iteration to stop waiting (such as
idle_add or timeout_add).
These rules ensure that iteration is able to block until an event
arrives, without doing any busy waiting that would waste CPU time.
@type may_block: bool
@param may_block: if True the call may block waiting for an event
(default is True).
@rtype: bool
@return: True if events were dispatched.
|
Like glib.child_watch_add(), sets callback to be called with the
user data specified by data when the child indicated by pid exits.
The signature for the callback is:
def callback(pid, condition, user_data)
where pid is is the child process id, condition is the status
information about the child process and user_data is data.
@type int
@param pid: process id of a child process to watch
@type callback: callable
@param callback: a function to call
@type data: object
@param data: the optional data to pass to function
@rtype: int
@return: an integer ID
|
Like glib.idle_add(), if callback returns False it is automatically removed from the list of event sources and will not be called again. This method is thread-safe.
|
Like glib.timeout_add(), interval argument is the number of milliseconds between calls to your function, and your function should return False to stop being called, or True to continue being called. Any additional positional arguments given here are passed to your function when it's called. This method is thread-safe. |
Like glib.io_add_watch(), your function should return False to stop being called, or True to continue being called. Any additional positional arguments given here are passed to your function when it's called.
|
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Wed May 15 16:30:09 2013 | http://epydoc.sourceforge.net |