public static final class SynchronizationContext.ScheduledHandle extends Object
SynchronizationContext.schedule(java.lang.Runnable, long, java.util.concurrent.TimeUnit, java.util.concurrent.ScheduledExecutorService).
This class is NOT thread-safe. All methods must be run from the same SynchronizationContext as which the task was scheduled in.
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Cancel the task if it's still
pending. |
boolean |
isPending()
Returns
true if the task will eventually run, meaning that it has neither started
running nor been cancelled. |
public void cancel()
pending.public boolean isPending()
true if the task will eventually run, meaning that it has neither started
running nor been cancelled.