摘要:
package com.example.test.async; import java.util.concurrent.CountDownLatch; public class CountDownLatchTest { private static final int COUNT = 5; priv 阅读全文
posted @ 2022-08-01 16:36
我自逍遥
阅读(136)
评论(0)
推荐(0)
摘要:
package com.example.test.async; import lombok.Getter; import java.util.concurrent.Exchanger; /** * 小红和小明是好朋友 * 小红想知道小明的小秘密 * 小明也想知道小红的小秘密 * 于是他们打算互相交换 阅读全文
posted @ 2022-08-01 10:37
我自逍遥
阅读(34)
评论(0)
推荐(0)
摘要:
package com.example.test.async; import java.util.Random; import java.util.concurrent.Semaphore; /* *一个小桑拿房一次最多只能容纳5个人 */ public class SemaphoreTest { 阅读全文
posted @ 2022-08-01 10:01
我自逍遥
阅读(66)
评论(0)
推荐(0)

浙公网安备 33010602011771号