Curriculum Concurrency Goroutines exercise 1 · mcq
Goroutines
Pick the line that starts worker() running concurrently with
the caller (in its own goroutine).
TypeScript: worker() calls synchronously; Promise.resolve()
.then(worker) defers but still runs on the same event loop
thread. Go has true concurrency baked into the language with
one keyword.
TypeScript reference
About this theme
go fn() runs fn concurrently with the caller. That's it. No promises, no async/await, no event loop — the runtime multiplexes goroutines over OS threads. Cheap to start (kilobytes of stack). And the discipline: never start a bare goroutine whose lifetime you can't reason about.