Practice
Learn
← Quit
0 / 0 correct
Go
Medium
1 of 45
What is the idiomatic way to stop goroutines doing work for a request that was cancelled?
A
Close os.Stdin
B
Use a global boolean flag
C
Pass a context.Context and have the goroutines select on ctx.Done()
D
Call runtime.Goexit from the handler