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