-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
shutdown issue (RuntimeError: must be called from async context) #4
Comments
Hello, thanks for the report. Minimal code: #!/usr/bin/env python3
from trio import run
from trio_serial import SerialStream
serial = SerialStream("/dev/ttyS0")
run(serial.aopen) https://github.com/python-trio/trio/blob/master/trio/_unix_pipes.py#L52-L74 is how trio solved this issue. Does #5 work for you? |
what's the easiest way to run this project in "development/editable" mode? with |
or, how can i just build the package to try it out? |
Or you can install poetry and then run |
simple :) thanks. i can confirm #5 fixes the issue! super! |
Run trio.lowlevel.notify_closing only from aclose. Fixes #4
hi,
if i ctrl-c my program when trio-serial is enabled i get:
when reading up a bit on this it seems like you're not supposed to do such calls from
__del__
(python-trio/trio-asyncio#44), but i'm not sure what the correct solution would look like.i instantiate my port with:
and doesn't really do much more with it (yet).
any suggestion?
The text was updated successfully, but these errors were encountered: