Skip to content

feat: add question about async/await and the event loop#11

Open
nursen-akay73 wants to merge 1 commit into
Devinterview-io:mainfrom
nursen-akay73:add-new-question
Open

feat: add question about async/await and the event loop#11
nursen-akay73 wants to merge 1 commit into
Devinterview-io:mainfrom
nursen-akay73:add-new-question

Conversation

@nursen-akay73
Copy link
Copy Markdown

@nursen-akay73 nursen-akay73 commented Jun 6, 2026

Summary

Adds a new interview question (#16) covering Python's native async/await concurrency model, which was previously not represented in the README.

What's included

  • Concurrency vs. parallelism and why asyncio targets I/O-bound (not CPU-bound) work due to the GIL.
  • Event loop mechanics: how coroutines yield control, get suspended, and are resumed when awaited resources become ready.
  • Coroutines, awaitables, and tasks — the distinction interviewers probe.
  • Structured concurrency with asyncio.TaskGroup (3.11+), including how it differs from asyncio.gather (cancellation + ExceptionGroup / except*).
  • Async context managers / iterators (async with, async for).
  • Common pitfalls: missing await, blocking the loop, fire-and-forget tasks, mixing sync/async.

Notes

  • Follows the existing question format.
  • All code examples use Python 3.12+ syntax.
  • Single file changed: README.md (+99 lines, no deletions).

Add interview question #16 covering Python's native async/await syntax:
concurrency vs. parallelism, event loop mechanics, coroutines/awaitables/
tasks, structured concurrency with asyncio.TaskGroup (3.11+), async
context managers/iterators, and common pitfalls. All examples use
Python 3.12+ syntax.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant