Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java多线程 #3

Open
WinfredWang opened this issue Jun 25, 2018 · 2 comments
Open

java多线程 #3

WinfredWang opened this issue Jun 25, 2018 · 2 comments

Comments

@WinfredWang
Copy link
Owner

WinfredWang commented Jun 25, 2018

知识点

1、基本概念
2、锁: synchronized/lock/volatile
3、通信/调度

相关文章:
https://juejin.im/post/5aae4e8f6fb9a028e52d9e8c
https://blog.csdn.net/hbtj_1216/article/details/76254076#commentBox
http://www.cnblogs.com/skywang12345/p/java_threads_category.html

@WinfredWang
Copy link
Owner Author

WinfredWang commented Jun 25, 2018

基础

  • 线程与进程区别
  • 线程状态
  • 如何实现Thread/Runable
  • 判断线程是否存活isAlive
  • 睡眠sleep
  • 如何停止线程
  • 暂停线程suspend/resume
  • yield:放弃当前CPU资源,将它让给其他任务执行,放弃时间不确定,有可能放弃后立马又执行力
  • 线程优先级

@WinfredWang
Copy link
Owner Author

WinfredWang commented Jun 30, 2018

线程间通信

  • wait/notify
  • 生成者消费者
  • join使用
  • ThreadLocal

  • synchronized
  • ReentrantLock
  • ReentrantReadWriteLock
  • CountDownLatch/CyclicBarrier和 Semaphore
  • 原子类/CAS

其它

  • Timer与定时任务
  • 线程组
  • 线程池
  • 线程安全集合
  • Fork/Join框架

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant