diff --git a/fuse.go b/fuse.go index 9926c67..dd2dcff 100644 --- a/fuse.go +++ b/fuse.go @@ -56,9 +56,13 @@ func (f *Fuse) Watch() <-chan struct{} { return f.c } -// Break breaks the fuse -func (f *Fuse) Break() { - f.Once(nil) +// Break breaks the fuse. It returns true if it was broken by this call. +func (f *Fuse) Break() bool { + broken := false + f.Once(func() { + broken = true + }) + return broken } // Once runs the callback and breaks the fuse