All challenges
Multiple ChoiceHard 30s

Context Cancellation

context.WithCancel's returned cancel function should be:
Options
  1. 1Ignored, since the runtime frees them later
  2. 2Called only on error, never on success
  3. 3Called (deferred) to release resources
  4. 4Stored globally, so goroutines can reuse them

Think you can answer under pressure?

Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.

Play this in a 3-minute battle