Skip to content

async_read_loop() never unlock the async loop #248

Description

@Anthonyntilelli

I am using async_read_loop() to do async read for key event in my co-routine, but there does not seem to be a way to unblock or end this look in the API spec. Attempting to close the device with the .close() function does not make the co-routine raise an exception or return something like a none. The only think that seem to make the function raise an error is unplugging the device its reading or causing some other os error.

Use case I would like to gracefully shutdown my program but the function will not unblock so there is no way to signal to the function its time to go. Without using other way such as cancelling the task.

Request: There should be someway to exit the for loop create by this function by sending a signal to the device over a different co-routine or by closing the device.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions