The sync-vs-async decision framework

P32.sync-vs-async.01 · Audience: guest, it-ml, language-pro · Prerequisites: Threads vs processes & the GIL

Real LLM grading for this pageLLM grading (this page):

You now have three tools — threads, processes, and (next pillar) asyncio. The senior skill is choosing between them, and knowing when to reach for none of them. This short track builds the decision framework and bridges into P33 · Asyncio & Coroutines.

Step 1 / 3Ask one question first
ⓘ Concept: CPU-bound or I/O-bound?
CPU-bound work keeps a core busy (hashing, parsing, crunching numbers). I/O-bound work mostly waits (network, disk, database). The GIL blocks parallel CPU work in threads but steps aside while you wait — so this one axis decides whether threads can help at all.

Why it matters — Almost every concurrency decision falls out of this single classification — get it right and the tool chooses itself.

Ask the mentor about this module

Ask a question about this content. The mentor explains and grounds its answer in what you are studying; asking is recorded as a learning signal, not a grade.

Ctrl/Cmd + Enter to send

🎓 Practice ladder

1 graded rung · ~8 min

Put it in words: build the decision table an interviewer would accept, and set up the bridge into asyncio.

Rung 1 — sync vs async, and how to choose (interview)

Loading exercise…

That framework — classify the work, then pick the tool — is what carries you into P33, where asyncio turns "wait on thousands of things at once" into ordinary code.