일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- jsp
- array
- UTF-8
- c++
- meta
- 자료구조
- Kafka
- JavaScript
- function
- Call-by-reference
- 포인터
- 노드
- 악성코드
- CLASS
- windows
- System
- java
- query
- beans
- algorithm
- 윈도우즈
- OOP
- API
- Sort
- CSS
- request
- WebProgramming
- HTML
- 투자
- C
Archives
- Today
- Total
목록CreateThread (1)
hahahia
간단한 쓰레드(thread) 생성 소스
/* thread.c made by hahahia */ #include #include #include DWORD WINAPI print2(LPVOID lpParams){ while(1) { printf("Thread2"); Sleep(800); } } DWORD WINAPI print1(LPVOID lpParam) { while(1) { printf("Thread1"); Sleep(500); } } int main() { int a; CreateThread(NULL, 0, print1, NULL, 0 , NULL); CreateThread(NULL, 0, print2, NULL, 0, NULL); while(1) { scanf("%d", &a); printf("%d\n", a); } }
Windows Programming/Windows::System
2012. 3. 23. 15:11