/explore

Click through on any links that interest you or select the planets on the right to continue exploring the Outer Web.
You are here

ghvsted.com
| | pace.dev
4.2 parsecs away

Travel
| | Mat Ryer shows how to respond gracefully to interrupt signals (like Ctrl+C) in your Go programs
| | hjr265.me
4.4 parsecs away

Travel
| | Signals are standardized messages that an operating system can send your programs. Take Ctrl+C for example. When running a program from the terminal and you hit Ctrl+C, you expect the program to end immediately. How does that work, though? Ctrl+C is a shortcut for the POSIX signal SIGINT. By default, this signal causes your program to be terminated. But this is one of those signals you can handle: You can intercept it and do whatever you please.
| | konradreiche.com
3.3 parsecs away

Travel
| | Starting a goroutine is as easy as adding the go keyword in front of a method, but managing the lifecycle of a goroutine is not. If you only need to start a few goroutines and wait for their completion, you are off the hook thanks to sync.WaitGroup. However, what if a goroutine has to run for a specific duration or repeatatly in a loop until the initiating code terminates? Does it matter? After all, if the main goroutine terminates, any other goroutine will also stop. It does matter, because depending on what the goroutines are doing, it might leave your system in an inconsistent or invalid state. Channels are a commonly used to signal to a goroutine that it can shut down, but I often see the use of a signaling channel, for example chan bool or chan struct{}...
| | typesanitizer.com
27.0 parsecs away

Travel
| Guidelines on learning and using Haskell: covers editor integration, CI, library choices, application architecture, debugging, profiling and addresses some common concerns.