|Constructor and Description|
|Modifier and Type||Method and Description|
Executes the given command at some time in the future in the mailbox thread.
This methods attempts to run the command at the head of the mailbox.
This methods starts running the command at the head of the mailbox and is intended to be used by the mailbox thread to yield from a currently ongoing action to another command.
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public void execute(@Nonnull RunnableWithException command, String descriptionFormat, Object... descriptionArgs)
An optional description can (and should) be added to ease debugging and error-reporting. The description
may contain placeholder that refer to the provided description arguments using
syntax. The actual description is only formatted on demand.
command- the runnable task to add to the mailbox for execution.
descriptionFormat- the optional description for the command that is used for debugging and error-reporting.
descriptionArgs- the parameters used to format the final description string.
public void yield() throws InterruptedException
public boolean tryYield()
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.