首页 | 本学科首页   官方微博 | 高级检索  
     

基于VC++和JAVA的多线程程序设计与实现
引用本文:孟伟君 李龙海 付少锋 周利华. 基于VC++和JAVA的多线程程序设计与实现[J]. 微机发展, 2006, 16(4): 35-37
作者姓名:孟伟君 李龙海 付少锋 周利华
作者单位:西安电子科技大学多媒体技术研究所 陕西西安710071
摘    要:讨论了多线程的基本概念及应用场合,总结了以面向对象主流语言VC 和JAVA为工具的多线程程序设计实现方法。比较了两种语言在创建和调度线程的差异,并分析了全局变量、自定义消息、等待/通知三种多线程间的通信机制。介绍了在VC 中用信号量、互斥体、事件和临界区四种对象实现和在JAVA中用Synchronized关键字实现的同步技术。最后,对改进多线程应用的性能和安全提出了一些策略。结论是多线程有利有弊,要合理使用。两种语言各有所长,根据应用而选。

关 键 词:多线程  调度  通信  同步  VC   JAVA
文章编号:1005-3751(2006)04-0035-03
修稿时间:2005-08-13

Design and Implementation of Multithread Programming Based on VC++ and JAVA
MENG Wei-jun,LI Long-hai,FU Shao-feng,ZHOU Li-hua. Design and Implementation of Multithread Programming Based on VC++ and JAVA[J]. Microcomputer Development, 2006, 16(4): 35-37
Authors:MENG Wei-jun  LI Long-hai  FU Shao-feng  ZHOU Li-hua
Abstract:Discusses the concepts and application of multithread and presents design and implementation method with the tools VC and JAVA which are popular OOP languages.The differences about creating and scheduling threads are compared and three threads communication mechanisms,which are global,user defined message and wait/notify,are analyzed.And then,some synchronization techniques,which are semaphore,mutex,event and critical section used in VC and synchronized key word used in JAVA,are introduced.At theand should be used rationally and that twolanguages also have theirs merits and should be chosen according to application occasions
Keywords:multithread  schedule  communication  synchronization  VC   JAVA
本文献已被 CNKI 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号