current_dispatch_filter(self)
|
|
Return a 3 tuple indicating the events you are interested in.
[OPTIONAL] implementations need not provide this method. If they do
then they must honour the following semantics.
The values True, False and None are the only leagal values for each of
R, W, E. The caller (eg., asycamore.dispatch.poll) maps this mask to
the actual representation needed by the underlying OS system socket
api. A value that evaluates True will result in the corresponding read,
write, or exceptional event being enabled for the next poll, select of
the socket state; A value that evaluates False (including None) will
mask the associated event. False or None is how you spell: Do not
signal me for this kind of event.
Disalowing explicit flag values in the rval of current_dispatch_filter
is asymetrical with respect to the event tuple passed as argument to
dispatch_event. dispatch_event implementations get the actual values as
provided by the OS IO/api. However, in all cases none of the
implementors of dispatch_event require anything other than truth or
falshood semantics from that event, and acordingly do not make
themselves depend on the exact values. Supporting OS specific masks as
in the rvalue for current_dispatch_filter is trivialy suportable here
but I dont want to encourage this. By default everything will use True,
False or None. If a need for specific control arrises (libevent ?) then
support can be added for that case without disturbing the defaults.
- Returns:
- (R, W, E)
|