public class LBCORE97 extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
LBCORE97.LockRunnable |
static class |
LBCORE97.SynchronizedRunnable |
| Constructor and Description |
|---|
LBCORE97() |
| Modifier and Type | Method and Description |
|---|---|
static void |
execute(String text,
Thread[] threads) |
static void |
main(String[] args) |
static void |
print(String text,
Runnable[] runnables) |
static void |
usingFairLock(int threadCount) |
static void |
usingSynchronized(int threadCount) |
static void |
usingUnfairLock(int threadCount) |
public static void main(String[] args) throws InterruptedException
InterruptedExceptionpublic static void execute(String text, Thread[] threads) throws InterruptedException
InterruptedExceptionpublic static void usingSynchronized(int threadCount)
throws InterruptedException
InterruptedExceptionpublic static void usingUnfairLock(int threadCount)
throws InterruptedException
InterruptedExceptionpublic static void usingFairLock(int threadCount)
throws InterruptedException
InterruptedExceptionCopyright © 2005–2017 QOS.ch. All rights reserved.