History

Merge WelsThreadDestroy into WelsThreadJoin

Now calling WelsThreadJoin is enough to finish and clean up the thread on all platforms. This unifies the thread cleanup code between windows and unix. Now all of the threading code should use the exact same codepaths between windows and unix.

Martin Storsjö committed 12 years ago

Commit 5b8ee371 parent b4aa9be4 files · +1 −32Browse files

Showing the changes to codec/encoder/core/src/slice_multi_threading.cpp (1 of 4 files). Show all

Unified · Split

codec/encoder/core/src/slice_multi_threading.cpp+0−5
@@ -451,11 +451,6 @@ void ReleaseMtResource (sWelsEncCtx** ppCtx) { · 450 unmodified lines
451 char ename[SEM_NAME_MAX] = {0};451 char ename[SEM_NAME_MAX] = {0};
452 while (iIdx < iThreadNum) {452 while (iIdx < iThreadNum) {
453 // length of semaphore name should be system constrained at least on mac 10.7453 // length of semaphore name should be system constrained at least on mac 10.7
454#ifdef _WIN32
455 if (pSmt->pThreadHandles != NULL && pSmt->pThreadHandles[iIdx] != NULL)
456 WelsThreadDestroy (&pSmt->pThreadHandles[iIdx]);
457
458#endif//_WIN32
459 WelsSnprintf (ename, SEM_NAME_MAX, "ee%d%s", iIdx, pSmt->eventNamespace);454 WelsSnprintf (ename, SEM_NAME_MAX, "ee%d%s", iIdx, pSmt->eventNamespace);
460 WelsEventClose (&pSmt->pExitEncodeEvent[iIdx], ename);455 WelsEventClose (&pSmt->pExitEncodeEvent[iIdx], ename);
461 WelsSnprintf (ename, SEM_NAME_MAX, "tm%d%s", iIdx, pSmt->eventNamespace);456 WelsSnprintf (ename, SEM_NAME_MAX, "tm%d%s", iIdx, pSmt->eventNamespace);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t