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

A warning should be raised if using await outside of a task. #123

Open
wlruys opened this issue Aug 1, 2023 · 0 comments
Open

A warning should be raised if using await outside of a task. #123

wlruys opened this issue Aug 1, 2023 · 0 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@wlruys
Copy link
Contributor

wlruys commented Aug 1, 2023

await can only be used as a barrier inside a task. This is an easy mistake to make as it would be valid python syntax to call await outside of a task.

It should be possible to catch this by checking the thread locals when accessing the await methods of TaskList, TaskSpace, and Task objects.

@wlruys wlruys added documentation Improvements or additions to documentation enhancement New feature or request labels Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant