Skip to content

How to add other file descriptors to the main loop? #110

Open
@jrief

Description

@jrief

Currently I am working on a server based on the code for WebSocketWSGIApplication in geventserver.py.

There, I wanted to add some code to this server to be informed when someone publishes a message through a Redis channel. This event is signaled through a file descriptor, which is a member of that channel class.
If I would own the main loop, this would be easy, since I could add this Redis fd to the list passed to the select.select call, and wait if either the websocket's fd or the Redis fd signals that some data is ready for reading.
However, since I can not access the main loop, I wanted to ask how to add foreign file descriptors to the select call in the main loop.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions