Skip to content

Commit

Permalink
Clarify how Persist() is supposed to work.
Browse files Browse the repository at this point in the history
  • Loading branch information
stapelberg committed Dec 30, 2014
1 parent 39bdb0e commit e0fc0a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fsm.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ type FSM interface {
// It must be safe to invoke FSMSnapshot methods with concurrent
// calls to Apply
type FSMSnapshot interface {
// Persist should dump all necessary state to the WriteCloser,
// and invoke close when finished or call Cancel on error.
// Persist should dump all necessary state to the WriteCloser 'sink',
// and call sink.Close() when finished or call sink.Cancel() on error.
Persist(sink SnapshotSink) error

// Release is invoked when we are finished with the snapshot
Expand Down

0 comments on commit e0fc0a5

Please sign in to comment.