Create a thread demo
来源:互联网 发布:mysql minpoolsize 编辑:程序博客网 时间:2024/04/25 16:46
//----------------------------------------------// Time: 2016-7-6// Author: Mancor// Description: Create a thread Test//----------------------------------------------#include "stdafx.h"#include <process.h>DWORD WINAPI ThreadProc(LPVOID lpParam){ while(1) { printf("I am the sub thread, GetCurrentThread:%d \r\n",GetCurrentThread()); Sleep(500); } return 0;}int _tmain(int argc, _TCHAR* argv[]){ printf("Test: Main Thread Start.\r\n"); DWORD dwThreadId = 0; CreateThread(NULL, 0, ThreadProc, NULL, 0, &dwThreadId); char szBuf[128]={0}; sprintf_s(szBuf, " File: %s, Function: %s, Line: %d \r\n",__FILE__,__FUNCTION__,__LINE__); printf(szBuf); while(1) Sleep(5); return 0;}
0 0
- Create a thread demo
- Create A Thread
- Create a thread under linux
- [ExtJs6] A demo to create a window
- How to create a simple Thread
- How To Create a kernel thread
- An UI puzzle - Create a dialog in a thread.
- Create Thread
- how to create a thread in win32 platform
- Two ways to create a new thread of execution
- A demo program to create subscreen in your ABAP Program
- CCThread(On iOS, should create autorelease pool when create a new thread)
- Cannot create children for a parent that is in a different thread
- QObject: Cannot create children for a parent that is in a different thread
- qt#5 QObject: Cannot create children for a parent that is in a different thread.
- Qt里出现 Cannot create children for a parent that is in a different thread
- QObject: Cannot create children for a parent that is in a different thread.
- QObject: Cannot create children for a parent that is in a different thread错误
- Qt---多线程应用的例子
- 9.6 转动精度与深入分析
- TEST
- Ubuntu安装fcitx和搜狗输入法
- ASCII表
- Create a thread demo
- 在线渗透工具大全
- First Bad Version
- JZOJ 3466.选课(select)
- 年月日三级联动(纯JS)
- javascript策略模式(strategy)
- LeetCode - 345. Reverse Vowels of a String
- 【3003】&&【9105】高精度求积 【高精度压位】
- 区分各关系