public class NonBlocking extends Object implements AutoCloseable
try (NonBlocking e = new NonBlocking())
{
// NonBlocking.isNonBlockingCaller() will now be true, and FlowControlled elements should respect this and not block
}
// NonBlocking.isNonBlockingCaller() will have been restored to its former value
| Constructor and Description |
|---|
NonBlocking() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
static boolean |
isNonBlockingCaller()
Return true if the the calling thread has been marked as non-blocking
|
public void close()
close in interface AutoCloseablepublic static boolean isNonBlockingCaller()