摘要:
import java.util.concurrent.Semaphore; public class T { public static void main(String[] args) { Semaphore semaphore = new Semaphore(3); for (int i = 阅读全文
摘要:
import lombok.SneakyThrows; import java.text.SimpleDateFormat; import java.util.concurrent.*; public class T { @SneakyThrows public static void main(S 阅读全文
摘要:
import lombok.SneakyThrows; import java.util.Date; import java.util.concurrent.*; /* main上锁3 线程1获得锁 线程2获得锁 线程3获得锁 线程1释放锁2 线程2释放锁1 线程3释放锁0 main解锁0 * */ 阅读全文
摘要:
fixed single cached import java.util.concurrent.*; public class T { public static void main(String[] args) { ExecutorService threadPool = getFixedThre 阅读全文
摘要:
jdk自带命令行工具:jsp + jstack -l pid jdk自带可视化工具:jvisualvm jdk自带可视化工具:jconsole public class T { public static void main(String[] args) throws InterruptedExce 阅读全文
摘要:
多条件变量 import java.util.concurrent.TimeUnit; import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.ReentrantLock; /* 多条件变量 **/ 阅读全文