2018年9月18日

如何实现线程间通信?

摘要: 一、通知等待机制的使用 二、join方法的使用 三、ThreadLocal的使用 四、InheritableThreadLocal的使用 (还需要再参考参考别人的博客改一改) 阅读全文

posted @ 2018-09-18 10:38 ming_jia 阅读(104) 评论(0) 推荐(0) 编辑

java中有哪些方法可以实现同步?

摘要: 一、显示锁 1.Synchronized 下面的就是再并发包中的锁: 2.ReentrantLock 3.读写锁(ReentrantReadWriteLock) 4.sta。。。 二、同步类容器 1.非并发包中的 2.并发包中的 三、同步类工具 1.CountDownLatch 2.CyclicBa 阅读全文

posted @ 2018-09-18 10:35 ming_jia 阅读(579) 评论(0) 推荐(0) 编辑

leetcode 209. Minimum Size Subarray Sum

摘要: Given an array of n positive integers and a positive integer s, find the minimal length of a contiguous subarray of which the sum ≥ s. If there isn't 阅读全文

posted @ 2018-09-18 00:18 ming_jia 阅读(121) 评论(0) 推荐(0) 编辑

导航