1. 程式人生 > >Java多線程小結

Java多線程小結

分享 sync jvm ctf out com href bee equals

相關資料

-------------------------------------------------------------------------------------

Java多線程demo

https://github.com/Beerkay/JavaMultiThreading

Java多線程簡介
http://www.runoob.com/java/java-multithreading.html

Java多線程PPT參考
https://wenku.baidu.com/view/c365afe4d5bbfd0a795673cf.html
https://wenku.baidu.com/view/5e24de023868011ca300a6c30c2259010202f317.html

其它多線程資料
https://blog.csdn.net/gf771115/article/details/51682561
http://ishare.iask.sina.com.cn/f/1H17Nwdhal1E.html
https://max.book118.com/html/2016/1205/68594207.shtm


the first share

-------------------------------------------------------------------------------------

為什麽要用多線程?
單核
多核

1 基本概念
CPU 進程 線程

2創建線程的兩種方式-傳統

start()
Thread.sleep()

匿名內部類
線程池
callble

3
synchronized

volatile

4集合框架和鎖
vector list
stringbuffer stringbuilder


多線程

-------------------------------------------------------------------------------------

volatile vs synchronized - 知乎 https://zhuanlan.zhihu.com/p/42538174

Java中Volatile關鍵字詳解 https://www.cnblogs.com/zhengbin/p/5654805.html

MESI協議 https://blog.csdn.net/unei66/article/details/25738977

Java關鍵字之native,strictfp,transient,volatile

http://www.cnblogs.com/wxf0701/archive/2008/08/13/1267344.html

Java關鍵字之native,strictfp,transient ,volatile

https://blog.csdn.net/lihui6636/article/details/27302971

join

https://www.cnblogs.com/aboutblank/p/3631453.html

多線程常用方法 sleep wait join等以及對鎖的控制

https://yq.aliyun.com/articles/48620


the picture

-------------------------------------------------------------------------------------

技術分享圖片

技術分享圖片

技術分享圖片

技術分享圖片

技術分享圖片

技術分享圖片


附:java內存模型

-------------------------------------------------------------------------------------

深入理解JVM—JVM內存模型

初識Java內存區域

Java Integer(-128~127)值的==和equals比較產生的思考

Java多線程小結