much better with those changes, thanks. PTAL.
https://codereview.appspot.com/5755055/diff/3001/tomb.go File tomb.go (right):
https://codereview.appspot.com/5755055/diff/3001/tomb.go#newcode44 tomb.go:44: // created or already alive. Once Kill is called with an On 2012/03/06 16:07:35, niemeyer wrote: > s/Kill/Kill or Killf/, as before please.
Done.
https://codereview.appspot.com/5755055/diff/3001/tomb.go#newcode80 tomb.go:80: if t.state == uninitialized { On 2012/03/06 16:07:35, niemeyer wrote: > if t.dead == nil { > t.dead = make(...) > t.dying = make(...) > t.reason = ErrStillRunning > }
> We don't need "state".
https://codereview.appspot.com/5755055/diff/3001/tomb.go#newcode130 tomb.go:130: reason = errCleanKill On 2012/03/06 16:07:35, niemeyer wrote: > nil itself is errCleanKill. We don't need a second way to flag this.
https://codereview.appspot.com/5755055/diff/3001/tomb.go#newcode136 tomb.go:136: if t.state == running { On 2012/03/06 16:07:35, niemeyer wrote: > if t.reason != ErrStillRunning
https://codereview.appspot.com/5755055/diff/3001/tomb.go#newcode162 tomb.go:162: } On 2012/03/06 16:07:35, niemeyer wrote: > The switch is unnecessary with the suggested change. Just return t.reason at all > times.
https://codereview.appspot.com/5755055/
« Back to merge proposal
much better with those changes, thanks.
PTAL.
https:/ /codereview. appspot. com/5755055/ diff/3001/ tomb.go
File tomb.go (right):
https:/ /codereview. appspot. com/5755055/ diff/3001/ tomb.go# newcode44
tomb.go:44: // created or already alive. Once Kill is called with an
On 2012/03/06 16:07:35, niemeyer wrote:
> s/Kill/Kill or Killf/, as before please.
Done.
https:/ /codereview. appspot. com/5755055/ diff/3001/ tomb.go# newcode80
tomb.go:80: if t.state == uninitialized {
On 2012/03/06 16:07:35, niemeyer wrote:
> if t.dead == nil {
> t.dead = make(...)
> t.dying = make(...)
> t.reason = ErrStillRunning
> }
> We don't need "state".
Done.
https:/ /codereview. appspot. com/5755055/ diff/3001/ tomb.go# newcode130
tomb.go:130: reason = errCleanKill
On 2012/03/06 16:07:35, niemeyer wrote:
> nil itself is errCleanKill. We don't need a second way to flag this.
Done.
https:/ /codereview. appspot. com/5755055/ diff/3001/ tomb.go# newcode136
tomb.go:136: if t.state == running {
On 2012/03/06 16:07:35, niemeyer wrote:
> if t.reason != ErrStillRunning
Done.
https:/ /codereview. appspot. com/5755055/ diff/3001/ tomb.go# newcode162
tomb.go:162: }
On 2012/03/06 16:07:35, niemeyer wrote:
> The switch is unnecessary with the suggested change. Just return
t.reason at all
> times.
Done.
https:/ /codereview. appspot. com/5755055/