Skip to content

Add asyncio-awaitable (non-polling) keypad.EventQueue.get() equivalent #8412

Closed
@davidmcnabnz

Description

@davidmcnabnz

This is a request for the keypad.EventQueue class to offer an asyncio-friendly awaitable alternative to the polling-based .get() method.

This would allow asyncio-based programs to follow a true event-driven programming pattern, and steer away from polling-based logic (which does not encourage good programming habits).

Such an alternative, possibly called keypad.EventQueue.aget(self, timeout=None), would:

  • block its calling task until/unless a key event happens
  • have an internal implementation that's truly interrupt-based, with no polling loops
  • allow other asyncio tasks to keep running normally

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions