thread->start_func = start_func;
thread->context = context;
thread->waitable = waitable;
- thread->thread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)silc_thread_win32_start, (void *)thread, 0, &id);
+ thread->thread =
+ CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)silc_thread_win32_start,
+ (void *)thread, 0, &id);
if (!thread->thread) {
SILC_LOG_ERROR(("Could not create new thread"));
}
return (SilcThread)self;
-#else
+ #else
return NULL;
#endif
}
/* The thread is waitable thus we will free all memory after the
WaitForSingleObject returns, the thread is destroyed after that. */
-
- /* 2 sec timeout, otherwise we would run to infinite loop some cases.. */
- if (WaitForSingleObject(self->thread, 2000) == WAIT_TIMEOUT)
+ if (WaitForSingleObject(self->thread, 2500) == WAIT_TIMEOUT)
TerminateThread(self->thread, 0);
silc_free(self);