1
#3432
Replies: 1 comment
-
|
Github discussions are meant for discussions on features and design of Codewars platform. This area is not intended for help with general programming questions. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I understand the basics of async and await, but I am struggling with the concept of the event loop and how it handles CPU-bound versus I/O-bound tasks.
My specific questions are:
If I run an async function that contains a long-running CPU-intensive calculation (without any await points), will this block the entire event loop, effectively making it synchronous? If so, what is the standard pattern to prevent this from happening?
How does the asyncio event loop differ fundamentally from using multi-threading (threading module) in terms of context switching and resource management?
Beta Was this translation helpful? Give feedback.
All reactions