Abstract:
This paper introduces the Process and Thread, advantages of multithread.The parallelism of Multithread is powerful, but introduces new problem-methods and variables need to be protected,so this paper give out how to do this with atomic operation,and finally how to create and suspend a thread in Java.
摘要: 文中首先介绍了进程与线程的区别,多线程的优势;多线程增加了运行的并行性,也引出了一些新问题,如方法和变量需要安全保护,介绍了Java中多线程的同步问题、原子操作、如何创建和挂起线程。
关键词:
进程,
线程,
同步,
原子操作
CLC Number:
Shen Fuke. Multithreading in Java[J]. , 1997, 23(04): 7-10.
沈富可. Java中的多线程机制[J]. , 1997, 23(04): 7-10.