diff options
author | 2015-06-17 11:49:04 -0700 | |
---|---|---|
committer | 2015-06-17 11:49:04 -0700 | |
commit | 2a4685f8bb1bf3cf098c5fee78a71e2f4204e428 (patch) | |
tree | 9f7a7015c05aa49fefada8fe0615a272f29904e2 | |
parent | c292ad4c1d18d7a1b9e6ae4d7a4cfd6f4e071be3 (diff) |
SkSemaphore: use SYNC_POLICY_LIFO on Mach.
Turns out _LIFO does work as we expected, keeping N < M threads active when we
have M live threads but only N units of work to do at a time. Also as we
expected _FIFO does round-robin through the threads.
Performance doesn't seem to be affected, but let's do it anyway.
If nothing else this makes profiles a little easier to read.
I don't see POSIX or Windows equivalents.
BUG=skia:
Review URL: https://codereview.chromium.org/1192433006
-rw-r--r-- | src/core/SkSemaphore.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/SkSemaphore.cpp b/src/core/SkSemaphore.cpp index 3f19d4fa12..ac62930082 100644 --- a/src/core/SkSemaphore.cpp +++ b/src/core/SkSemaphore.cpp @@ -13,7 +13,7 @@ semaphore_t fSemaphore; OSSemaphore() { - semaphore_create(mach_task_self(), &fSemaphore, SYNC_POLICY_FIFO, 0/*initial count*/); + semaphore_create(mach_task_self(), &fSemaphore, SYNC_POLICY_LIFO, 0/*initial count*/); } ~OSSemaphore() { semaphore_destroy(mach_task_self(), fSemaphore); } |