Skip to content

Don't use Condition.wait() in the main event loop #6999

@kpayson64

Description

@kpayson64

There is an issue with condition.wait() ignoring SIGINT https://bugs.python.org/issue8844

It has been fixed on Python3, but was not backported to Python2.7. This can cause clients to hang on SIGINT if there are unfinished streaming calls.

Condition.wait(timeout) does not have this problem, but looking at the implementation, it does a 1-5 ms poll on the lock in Python (with the GIL), so I don't think its justified doing that as part of the main event loop.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions