Package nbxmpp :: Module idlequeue :: Class GlibIdleQueue

[hide private]
[frames] | no frames]

# Class GlibIdleQueue

source code

Extends IdleQueue to use glib io_add_wath, instead of select/poll In another 'non gui' implementation of Gajim IdleQueue can be used safetly

Instance Methods | [hide private]

_init_idle(self) Creates a dict, which maps file/pipe/sock descriptor to glib event id | source code

_add_idle(self, fd, flags) This method is called when we plug a new idle object. Start listening for events from fd | source code

_process_events(self, fd, flags) | source code

_remove_idle(self, fd) This method is called when we unplug a new idle object. Stop listening for events from fd | source code

process(self) Process idlequeue. Check for any pending timeout or alarm events. Call IdleObjects on possible and requested read, write and error events on their file descriptors | source code

Inherited from `IdleQueue`: `__init__`, `current_time`, `plug_idle`, `remove_alarm`, `remove_timeout`, `set_alarm`, `set_read_timeout`, `unplug_idle` Inherited from `IdleQueue` (private): `_check_time_events`

Class Variables | [hide private]

| PROCESS_TIMEOUT = ``(`2`,` True`)``

Method Details | [hide private]

### _init_idle(self)

source code

Creates a dict, which maps file/pipe/sock descriptor to glib event id

Overrides: IdleQueue._init_idle

### _add_idle(self, fd, flags)

source code

This method is called when we plug a new idle object. Start listening for events from fd

Overrides: IdleQueue._add_idle

### _process_events(self, fd, flags)

source code

Overrides: IdleQueue._process_events

### _remove_idle(self, fd)

source code

This method is called when we unplug a new idle object. Stop listening for events from fd

Overrides: IdleQueue._remove_idle

### process(self)

source code

Process idlequeue. Check for any pending timeout or alarm events. Call IdleObjects on possible and requested read, write and error events on their file descriptors

Call this in regular intervals.

Overrides: IdleQueue.process
  (inherited documentation)

Class Variable Details | [hide private]

### PROCESS_TIMEOUT

Value:

      (2, True)