Skip to content
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

Support Task methods result(), exception(), and cancelled() #53

Open
imnotjames opened this issue Nov 8, 2023 · 1 comment · May be fixed by #54
Open

Support Task methods result(), exception(), and cancelled() #53

imnotjames opened this issue Nov 8, 2023 · 1 comment · May be fixed by #54

Comments

@imnotjames
Copy link
Contributor

CPython's tasks are subclasses of PyFuture. This means they have result, exception methods. They also have a cancelled method.

As a user of the asyncio library I want the circuitpython library to support these so I can inspect tasaks more easily from outside asyncio - eg, without having to muck around with CircuitPython asyncio task internals like state or data.

This would require some changes to the core loop for setting these values, but shouldn't be a huge difficulty otherwise? It should be negligible for memory usage / library footprint / etc, unless I'm misunderstanding how the library operates today.

@imnotjames
Copy link
Contributor Author

If this is to be supported then it needs to first be handled in _asyncio then updated here.

@imnotjames imnotjames linked a pull request Nov 8, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant