转自:https://www.cnblogs.com/java-zzl/p/9741288.html 一.通过SynchronousQueue方式实现线程间数据传递: 线程A与线程B共同持有一个SynchronousQueue的引用,线程B调用take方法,阻塞以等待: 线程A运行后计算出结果,将结果put到queue中; public class SynchronousQueueTest { public static void main(String[] args) throws Inter