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

Use a .start() method? #380

Open
Dreamsorcerer opened this issue Dec 31, 2022 · 0 comments
Open

Use a .start() method? #380

Dreamsorcerer opened this issue Dec 31, 2022 · 0 comments
Assignees

Comments

@Dreamsorcerer
Copy link
Member

Dreamsorcerer commented Dec 31, 2022

Related to #69.

I'm wondering if we should move the creation of the wait_failed task to a .start() method or similar, so that it is not a mistake to instantiate the Scheduler outside of a running loop.

So valid code could look like:

scheduler = Scheduler()

async def main():
    scheduler.start()
    await scheduler.spawn(coro())

I'd like to hear some thoughts from @asvetlov, so leaving this here.

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

No branches or pull requests

2 participants