DevBits
Home
Atlas
Play
About
Sign up
Log in
All
Go
context.Context.Done()
Examples using...
context.Context.Done()
Recent
Examples
WithCancel in Go
by GoDoc
Go
context.Context.Done
context
context.Background
context.Context
context.WithCancel
This example demonstrates the use of a cancelable context to prevent a goroutine leak. By the end of the example function, the goroutine started by gen will return without leaking.