Package proton :: Module _reactor :: Class EventInjector
[frames] | no frames]

type EventInjector

source code

Can be added to a reactor to allow events to be triggered by an external thread but handled on the event thread associated with the reactor. An instance of this class can be passed to the Reactor.selectable() method of the reactor in order to activate it. The close() method should be called when it is no longer needed, to allow the event loop to end if needed.

Instance Methods
__init__(self) source code
trigger(self, event)
Request that the given event be dispatched on the event thread of the reactor to which this EventInjector was added.
source code
Request that this EventInjector be closed.
source code
fileno(self) source code
on_selectable_init(self, event) source code
on_selectable_readable(self, event) source code
Method Details


source code 
Overrides: object.__init__
(inherited documentation)


source code 

Request that this EventInjector be closed. Existing events will be dispatched on the reactors event dispatch thread, then this will be removed from the set of interest.