Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <windows.h>
- using namespace std;
- DWORD ThreadFunc(void *) {
- for (;;);
- }
- int main() {
- for (int i = 0; i < 100000; i++) {
- if (i % 100 == 0) {
- std::cout << "Here " << i << std::endl;
- }
- HANDLE hThread = CreateThread(NULL, 0, ThreadFunc, NULL, 0, NULL);
- if (!TerminateThread(hThread, 42)) {
- std::cout << "niasilil" << std::endl;
- }
- CloseHandle(hThread);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement