Source File
executor.go
Belonging Package
github.com/modern-go/concurrent
package concurrentimport// Executor replace go keyword to start a new goroutine// the goroutine should cancel itself if the context passed in has been cancelled// the goroutine started by the executor, is owned by the executor// we can cancel all executors owned by the executor just by stop the executor itself// however Executor interface does not Stop method, the one starting and owning executor// should use the concrete type of executor, instead of this interface.type Executor interface {// Go starts a new goroutine controlled by the contextGo(handler func(ctx context.Context))}
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |