Fixing threading problems by reordering lines at random. It is the only true way.

This commit is contained in:
Jussi Pakkanen 2015-12-27 10:36:45 +02:00
parent d92e6c4595
commit aa1fc44aca
1 changed files with 2 additions and 2 deletions

View File

@ -9,9 +9,9 @@ DWORD WINAPI thread_func(LPVOID ignored) {
} }
int main(int argc, char **argv) { int main(int argc, char **argv) {
printf("Starting thread.\n");
HANDLE th;
DWORD id; DWORD id;
HANDLE th;
printf("Starting thread.\n");
th = CreateThread(NULL, 0, thread_func, NULL, 0, &id); th = CreateThread(NULL, 0, thread_func, NULL, 0, &id);
WaitForSingleObject(th, INFINITE); WaitForSingleObject(th, INFINITE);
printf("Stopped thread.\n"); printf("Stopped thread.\n");