Package edu.wpi.first.util.concurrent
Class Event
java.lang.Object
edu.wpi.first.util.concurrent.Event
- All Implemented Interfaces:
AutoCloseable
public final class Event extends Object implements AutoCloseable
An atomic signaling event for synchronization.
Events have binary state (signaled or not signaled) and may be either automatically reset or manually reset. Automatic-reset events go to non-signaled state when a waitForObject is woken up by the event; manual-reset events require reset() to be called to set the event to non-signaled state; if reset() is not called, any waiter on that event will immediately wake when called.
-
Constructor Details
-
Event
Constructor.- Parameters:
manualReset
- true for manual reset, false for automatic resetinitialState
- true to make the event initially in signaled state
-
Event
Constructor. Initial state is false.- Parameters:
manualReset
- true for manual reset, false for automatic reset
-
Event
public Event()Constructor. Automatic reset, initial state is false.
-
-
Method Details