Skip to main content
🔒 Preview mode. The first 15 Foundations lessons are free; this one is Pro. Start a 7-day trial to unlock the editor, AI hints and the rest of the curriculum. Card required, cancel any time in Dashboard.
Start 7-day trial →
⚡
← Courses
›
Interview Prep
›
Module 6 · Concurrency, OS, ML Interview Topics
›
asyncio: event loop and await
quiz
86 / 104
🇺🇸
EN
▼
↗
Share
⋯
More
+100 XP
📋
Task
📖
Theory
🤖
AI Help
Task
📝 **Question:** Right way to call a blocking library inside async? 📋 Pick the right answer. 💡 **Hint:** Re-read the theory above if unsure.
🎯 Quiz
Question
📝 **Question:** Right way to call a blocking library inside async? 📋 Pick the right answer. 💡 **Hint:** Re-read the theory above if unsure.
A
Just call it — Python 3.12's event loop transparently offloads any blocking syscall onto its internal worker pool.
B
`await asyncio.to_thread(fn, *args)` — runs in a thread pool, doesn't block the loop.
C
Spawn a `multiprocessing.Process` per blocking call — process isolation guarantees the event loop never stalls again.
D
Use raw `threading.Thread(target=fn).start()` — the GIL releases on blocking IO so the async loop continues to run cleanly.
Submit answer
💬 Discussion
Be the first to ask a question or share a tip.
Sign in
to join the discussion. Reading is free.
Loading discussion…