coordinated_pausing

command
v0.0.0-...-c509061 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 11, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

README

Example 1: simple conductor used to coordinate many workers

This example shows how to use a conductor created with conductor.SimpleFromContext to coordinate multiple workers at once.

Start the example

$ go run main.go

In another terminal, send signal to the running program

$ kill -SIGUSR1 <PID_OF_GO_RUN>  # To pause the workers
$ kill -SIGUSR2 <PID_OF_GO_RUN>  # To unpause the workers

even easier with pkill

$ pkill -SIGUSR1 main
$ pkill -SIGUSR2 main

ctrl+c in the original terminal to clean exit all the workers.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL