History

astyle all files

huili2 committed 12 years ago

Commit 5ed24f21 parent 0c24686120 files · +3967 −3886Browse files

Showing the changes to codec/common/src/WelsThreadLib.cpp (1 of 120 files). Show all

Unified · Split

codec/common/src/WelsThreadLib.cpp+10−10
@@ -175,13 +175,13 @@ WELS_THREAD_ERROR_CODE WelsEventClose (WELS_EVENT* event, const char* event_n · 174 unmodified lines
175175 WELS_THREAD_ERROR_CODE WelsThreadCreate (WELS_THREAD_HANDLE* thread, LPWELS_THREAD_ROUTINE routine,
176176 void* arg, WELS_THREAD_ATTR attr) {
177177 #ifdef USE_THREADPOOL
178− HANDLE h = CreateEvent(NULL, FALSE, FALSE, NULL);
178+ HANDLE h = CreateEvent (NULL, FALSE, FALSE, NULL);
179179 HANDLE h2;
180− DuplicateHandle(GetCurrentProcess(), h, GetCurrentProcess(), &h2, 0, FALSE, DUPLICATE_SAME_ACCESS);
181− ThreadPool::RunAsync(ref new WorkItemHandler([=](IAsyncAction^) {
182− routine(arg);
183− SetEvent(h2);
184− CloseHandle(h2);
180+ DuplicateHandle (GetCurrentProcess(), h, GetCurrentProcess(), &h2, 0, FALSE, DUPLICATE_SAME_ACCESS);
181+ ThreadPool::RunAsync (ref new WorkItemHandler ([ = ] (IAsyncAction^) {
182+ routine (arg);
183+ SetEvent (h2);
184+ CloseHandle (h2);
185185 }, CallbackContext::Any), WorkItemPriority::Normal, WorkItemOptions::TimeSliced);
186186 #else
187187 WELS_THREAD_HANDLE h = CreateThread (NULL, 0, routine, arg, 0, NULL);
@@ -265,15 +265,15 @@ WELS_THREAD_ERROR_CODE WelsEventOpen (WELS_EVENT* p_event, const char* event_ · 77 unmodified lines
265265 return WELS_THREAD_ERROR_OK;
266266 }
267267 #else
268− WELS_EVENT event = (WELS_EVENT) malloc(sizeof(*event));
268+ WELS_EVENT event = (WELS_EVENT) malloc (sizeof (*event));
269269 if (event == NULL)
270270 return WELS_THREAD_ERROR_GENERAL;
271− WELS_THREAD_ERROR_CODE err = sem_init(event, 0, 0);
271+ WELS_THREAD_ERROR_CODE err = sem_init (event, 0, 0);
272272 if (!err) {
273273 *p_event = event;
274274 return err;
275275 }
276− free(event);
276+ free (event);
277277 return err;
278278 #endif
279279 }
@@ -285,7 +285,7 @@ WELS_THREAD_ERROR_CODE WelsEventClose (WELS_EVENT* event, const char* event_n · 5 unmodified lines
285285 return err;
286286 #else
287287 WELS_THREAD_ERROR_CODE err = sem_destroy (*event); // match with sem_init
288− free(*event);
288+ free (*event);
289289 return err;
290290 #endif
291291 }

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