Lock the guard before checking the count.
Lock the guard before checking the count.

Small race in the barrier. If the count was dropped to 0
before the lock was grabed in `fn signal()` the event would
be missed.

slide-rs/pulse