线程间通讯的五种方式

45 阅读1分钟

概括下来有五种常用的通讯方式:
1、使用wait()、notify()和notifyAll();
2、使用BlockingQueue;
3、Exchange;
4、使用Locks和Condition;
5、使用Semaphore。