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