Skip to content

async_read_loop() never unlock the async loop #248

@Anthonyntilelli

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.

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