On Wednesday, 4 April 2012 06:29:29 UTC+9:30, Gustavo Niemeyer wrote:
An update to the tomb package has just been pushed with the following changes:
- ErrStillRunning is now ErrStillAlive, to conform to the terminology.
- ErrDying introduced. When the tomb state changes to dying and there's still logic going on within the goroutine, nested functions and methods may choose to return ErrDying as their error value, as this error won't alter the tomb state if provied to the Kill method. This is a convenient way to follow standard Go practices in the context of a dying tomb.
The blog post explaining the tomb package usage has also been updated to cover the new API. It has a nice example explaining how to use it: