MultiThread 2
来源:互联网 发布:qt高级编程 pdf下载 编辑:程序博客网 时间:2024/06/10 15:03
#include <windows.h>
#include <iostream.h>
DWORD WINAPI Fun1Proc(LPVOID lpParameter);
void main()
{
int index=0;
HANDLE hThread;
hThread=CreateThread(NULL,0,Fun1Proc,NULL,0,NULL);
CloseHandle(hThread);
while (index++<100)
{
cout<<"main thread is running"<<endl;
}
}
DWORD WINAPI Fun1Proc(LPVOID lpParameter)
{
int index=0;
while (index<100)
{
cout<<"thread1 is running"<<endl;
}
return 0;
}
和上一个帖子中的程序差别不大,在main函数和fun1proc中加入循环,示例时间片轮转的运行
- MultiThread 2
- multiThread(2)
- MultiThread Mutex
- HttpClient Multithread
- Multithread chips
- OGRE - MultiThread
- multithread(1)
- multithread copy
- Java multithread
- Debug Multithread DLL 与 Debug Multithread
- MultiThread——WaitForSingleObject
- 多线程 MultiThread.cpp
- two ways of multiThread
- sizeWithFont in MultiThread Crash!
- C for Multithread 笔记
- Android MultiThread & Handler & AsyncTask
- MultiThread in Unity
- Java MultiThread学习笔记
- Google面试题解说性能
- 外包新政策或年底出台
- 求助ACM查文章的技巧?
- 初窥Windows内核——学习Windows Research Kernel手记(四)
- ORA-01031: insufficient privileges
- MultiThread 2
- 谁动了我的Scancode?
- Flex 与 JavaScript相互调用函数
- web.xml和struts-config.xml配置方法
- 从两道经典试题谈C/C++中联合体(union)的使用
- c#设置目录权限(.net控制alc)
- c#汉字简体繁体转换的代码
- 你今天volatile了吗?--慎重使用
- 在内核模式驱动程序中调用 DLL