Sr. Software Engineer @ RedHat
previously...
SRE Tech Lead/Manager @ Stone
Having fun with goroutines
Finishing work properly
Listening to system signals
Handling interrupts in a production environment
Goroutines are lightweight threads that are managed by the Go Runtime.
The main function is a goroutine itself and it can launch other goroutines that run concurrently to it.
(...)
Program execution begins by initializing the main package and then invoking the function main. When that function invocation returns, the program exits. It does not wait for other (non-main) goroutines to complete.
Having fun with goroutines
Finishing work properly
Listening to system signals
Handling interrupts in a production environment
By listening to system signals.
Having fun with goroutines
Finishing work properly
Listening to system signals
Handling interrupts in a production environment
SIGINT
SIGTERM
SIGKILL
SIGSTOP -> SIGCONT
"A channel provides a mechanism for concurrently executing functions to communicate by sending and receiving values of a specified element type."
Having fun with goroutines
Listening to system signals
Finishing work properly
Handling interrupts in a production environment
You can find me on twitter (@__biancarosa) if you wanna chat!
Thank you for your time!