일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- jsp
- OOP
- algorithm
- JavaScript
- array
- Kafka
- beans
- windows
- meta
- 투자
- Call-by-reference
- API
- request
- 윈도우즈
- C
- 노드
- UTF-8
- System
- java
- function
- CSS
- 자료구조
- Sort
- query
- c++
- WebProgramming
- 악성코드
- CLASS
- HTML
- 포인터
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