public interface BlockingStrategy
PARKING,
also you can provide any other implementation which for example does something useful instead of blocking(acts as co-routine) or does spin loop.| Modifier and Type | Field and Description |
|---|---|
static BlockingStrategy |
PARKING |
| Modifier and Type | Method and Description |
|---|---|
void |
park(long nanosToPark)
Park current thread to required duration of nanoseconds.
|
void |
parkUninterruptibly(long nanosToPark)
Parks current thread to required duration of nanoseconds ignoring all interrupts,
if interrupt was happen then interruption flag will be restored on the current thread.
|
static final BlockingStrategy PARKING
void park(long nanosToPark) throws InterruptedException
InterruptedException in case of current thread was interrupted.nanosToPark - time to park in nanosecondsInterruptedException - if current tread is interrupted.void parkUninterruptibly(long nanosToPark)
nanosToPark - time to park in nanosecondsCopyright © 2017. All rights reserved.