
JAVA
iteye_15645
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
用java 实现生产者、消费者模型
[code="java"] public class MessageQueue { private List queue = new ArrayList(); public synchronized String getMessage() throws InterruptedException { while (queue.isEmpty()) { wait()...原创 2014-03-08 16:07:59 · 125 阅读 · 0 评论 -
使用Semaphore优雅解决打印ABC, ABCD 的问题
[code="java"] public class ABCPrint { public static void main(String[] args){ Semaphore sa = new Semaphore(1); Semaphore sb = new Semaphore(0); Semaphore sc = new Semaphore(0); ...原创 2016-11-29 08:55:07 · 288 阅读 · 0 评论