Skip to content

asyncio help with multiple tasks #16868

Discussion options

You must be logged in to vote
while i < 100:
        i += 1
        asyncio.create_task(motor_1(direction, steps_per_rev, speed))
        asyncio.create_task(motor_2(direction, steps_per_rev, speed))
        asyncio.create_task(motor_3(direction, steps_per_rev, speed))

You're rapidly creating 300 tasks. Is that intentional?

Replies: 3 comments 23 replies

Comment options

You must be logged in to vote
3 replies
@GitHubsSilverBullet
Comment options

Answer selected by davefes
@davefes
Comment options

@davefes
Comment options

Comment options

You must be logged in to vote
6 replies
@mendenm
Comment options

@mendenm
Comment options

@davefes
Comment options

@davefes
Comment options

@davefes
Comment options

Comment options

You must be logged in to vote
14 replies
@davefes
Comment options

@jbodegraven
Comment options

@davefes
Comment options

@mendenm
Comment options

@davefes
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants