Grokking Concurrency in Go
Vote

0% completed

​

Testing Timeouts and Cancellation

How would you prove that a function stops its work when its caller cancels the context? Calling the function and getting a correct result proves that it finishes. It says nothing about what happens when the caller cancels halfway through.

A function can ignore its context completely and still pass every test that lets it run to the end. The bug shows up only in production, as goroutines that keep fetching pages for requests that were abandoned long ago

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content