public interface ServerThreadLock extends AutoCloseable
It is highly recommended to use this interface with try-with-resource blocks.
ThreadContext.SYNC| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the lock, and allows the main thread to continue
|
static ServerThreadLock |
obtain()
Blocks the current thread until a
ServerThreadLock can be obtained. |
static ServerThreadLock obtain()
ServerThreadLock can be obtained.
Will attempt to return immediately if the calling thread is the main thread itself.
void close()
close in interface AutoCloseableCopyright © 2017. All rights reserved.