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