Skip to content

Commit

Permalink
trivials for review
Browse files Browse the repository at this point in the history
  • Loading branch information
Roger Peppe committed Mar 6, 2012
1 parent b90c2b1 commit 6a28520
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion tomb.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ func (t *Tomb) Wait() error {
// called, it will be flagged as dying and dead at once with no
// error.
func (t *Tomb) Done() {
t.init()
t.Kill(nil)
close(t.dead)
}
Expand Down
4 changes: 2 additions & 2 deletions tomb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ func TestNewTomb(t *testing.T) {
}

func TestKill(t *testing.T) {
// the Kill reason flags the goroutine as dying
// a nil reason flags the goroutine as dying
tb := new(tomb.Tomb)
tb.Kill(nil)
testState(t, tb, true, false, nil)

// a non-Kill reason now will override Kill
// a non-nil reason now will override Kill
err := errors.New("some error")
tb.Kill(err)
testState(t, tb, true, false, err)
Expand Down

0 comments on commit 6a28520

Please sign in to comment.