This commit is contained in:
C-o-r-E 2013-02-26 21:40:31 -05:00
commit 8dd49c4d4e
2 changed files with 5 additions and 3 deletions

View File

@ -88,6 +88,7 @@ int wf_info_try_lock(wfInfo* wfi, DWORD dwMilliseconds)
int wf_info_unlock(wfInfo* wfi)
{
if (ReleaseMutex(wfi->mutex) == 0)
{
printf("wf_info_unlock failed with 0x%08X\n", GetLastError());
@ -125,8 +126,8 @@ wfInfo* wf_info_init()
_tprintf(_T("CreateMutex error: %d\n"), GetLastError());
}
wfi->updateEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
printf("updateEvent created\n");
//wfi->updateEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
//printf("updateEvent created\n");
wfi->updateSemaphore = CreateSemaphore(NULL, 0, 32, NULL);

View File

@ -81,7 +81,8 @@ DWORD WINAPI wf_update_thread(LPVOID lpParam)
for (index = 0; index < wfi->activePeerCount; index++)
{
//printf("Waiting for %d of %d\n", index + 1, wfi->activePeerCount);
WaitForSingleObject(wfi->updateSemaphore, INFINITE);
//WaitForSingleObject(wfi->updateSemaphore, INFINITE);
WaitForSingleObject(wfi->updateSemaphore, 1000);
}
//printf("End of parallel sending\n");