worker.go PmRb�U �c�U package main import ( "context" "fmt" "log" "math/rand" "os" "os/signal" "sync" "syscall" "time" ) func main() { ctx, cancel := context.WithCancel(context.Background()) defer cancel() sigCh := make(chan os.Signal, 1) defer close(sigCh) signal.Notify(sigCh, syscall.SIGHUP, syscall.SIGQUIT, syscall.SIGINT) go func() { <-sigCh cancel() }() d := NewDispatcher(3) for i := 0; i < 1
![worker.go](https://cdn-ak-scissors.b.st-hatena.com/image/square/1ef26f6cb4349557952890dbe3e567f7f98dc151/height=288;version=1;width=512/https%3A%2F%2Fgithub.githubassets.com%2Fassets%2Fgist-og-image-54fd7dc0713e.png)