Go Slices & Time Complexity
Slices in Go automatically adjust their size when new values are inserted. O(n) is the time complexity for this operation.
Slices in Go automatically adjust their size when new values are inserted. O(n) is the time complexity for this operation.
Constants in Go, and an observation about the type system. Following on from previous articles about type coercion, another limited form is identified and explored.
An exploration of channel direction in Go, and a perspective on its implications for the type system.
An approach we might take to closing worker pools using standard lib’s sync.WaitGroup to keep track of how many of the workers are still running.
The worker pool pattern involves creating a specific number of workers (goroutines), each responsible for executing tasks. These workers listen for tasks on a common channel. Any free worker can pick up a task and execute it.