-
Notifications
You must be signed in to change notification settings - Fork 119
Description
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.