A folly baton is like a condition variable but that is only used once.
Quote from the header in folly:
A Baton allows a thread to block once and be awoken. Captures a
single handoff, and during its lifecycle (from construction/reset
to destruction/reset) a baton must either be post()ed and wait()ed
exactly once each, or not at all.
The thing is, we called reset every time the signal was received, so
we were effectively using the baton like a normal condition variable.
A folly baton is like a condition variable but that is only used once. Quote from the header in folly:
The thing is, we called reset every time the signal was received, so we were effectively using the baton like a normal condition variable.