Package uk.ac.manchester.spinnaker.utils
Class OneShotEvent
java.lang.Object
uk.ac.manchester.spinnaker.utils.OneShotEvent
public final class OneShotEvent extends Object
An asynchronous event that can be fired exactly once.
- Author:
- Donal Fellows
-
Constructor Summary
Constructors Constructor Description OneShotEvent()
-
Method Summary
-
Constructor Details
-
OneShotEvent
public OneShotEvent()
-
-
Method Details
-
await
Wait for the event to fire.- Throws:
InterruptedException
- If wait is interrupted.
-
fire
public void fire()Fire the event.
-