Skip to content

Task can run with thread, but not with process #930

Answered by ardevik
ardevik asked this question in Q&A
Discussion options

You must be logged in to vote

i found the answer in anyio documentation, we need to check the name before calling asyncio.run(main())

if __name__ == '__main__':
    asyncio.run(main())

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@agronholm
Comment options

Answer selected by ardevik
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants