PyDocs

Nav

Networking and Interprocess Communication

BaseSelector

Selector abstract base class.

A selector supports registering file objects to be monitored for specific
I/O events.

A file object is a file descriptor or any object with a `fileno()` method.
An arbitrary object can be attached to the file object, which can be used
for example to store context information, a callback, etc.

A selector can use various implementations (select(), poll(), epoll()...)
depending on the platform. The default `Selector` class uses the most
efficient implementation on the current platform.
Members of BaseSelector

c

close
Close the selector.

g

get_key
Return the key associated to a registered file object.
get_map
Return a mapping of file objects to selector keys.

m

modify
Change a registered file object monitored events or attached data.

r

register
Register a file object.

s

select
Perform the actual selection, until some monitored file objects are ready or a timeout expires.

u

unregister
Unregister a file object.
0 Examples
No examples for selectors/BaseSelector.
See Also
No see-alsos for selectors/BaseSelector
0 Notes
No notes for BaseSelector