You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seems like aioserial.cancel_read() does not work. It might be that I am not aware of some concurrency rule(s), as I am quite inexperienced with asyncio/aioserial.
Read timeout is intentionally set to 5 sec, while it should be canceled by cancel_read() after 1 sec.
I would expect first cancel_read() to throw exception and break out of read_and_print(), something like this:
I've tested this with non-async version of the same code, with aioserial (read() running in thread, cancel_read() in main), and it works, so it must be something related to async stuff.
Any help is very appreciated.
The text was updated successfully, but these errors were encountered:
schperplata
added a commit
to damogranlabs/serial-tool
that referenced
this issue
Sep 3, 2023
Seems like
aioserial.cancel_read()
does not work. It might be that I am not aware of some concurrency rule(s), as I am quite inexperienced withasyncio
/aioserial
.Here is the minimum steps to reproduce:
Read timeout is intentionally set to 5 sec, while it should be canceled by
cancel_read()
after 1 sec.I would expect first
cancel_read()
to throw exception and break out ofread_and_print()
, something like this:Instead, nothing happens and loop is continuing:
I've tested this with non-async version of the same code, with
aioserial
(read()
running in thread,cancel_read()
in main), and it works, so it must be something related to async stuff.Any help is very appreciated.
The text was updated successfully, but these errors were encountered: