摘要
多线程程序,可以让计算机在同一段时间内并行处理不同的工作任务,实现多任务同时工作。在Java程序中有两种方式创建线程,而用synchronized关键字来修饰线程的方法,则可实现线程之间的同步,保证在同一时刻只有一个线程访问该方法,实现资源之间的协商共享。
The multithreading program may let computer process different tasks parallelly in the identical time to fulfill the multl-duties work simultaneously. In the Java language, there are two manners to create a thread ,while the synchronous between more procedures can be reallized by means of decoration with the synchronized keywords, so code sharing of multithreading procedure can be reached.
出处
《现代计算机》
2007年第12期82-84,共3页
Modern Computer