change dispatch queue priority

This commit is contained in:
SCG82 2019-12-13 04:16:34 -08:00
parent 1b4d70cbb7
commit 1487f42082
2 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
DESTDIR= DESTDIR=
PREFIX=/usr/local PREFIX=/usr/local
CXX=clang++ CXX=clang++
LD=`xcrun -f clang++` LD=$(shell xcrun -f clang++)
CXXFLAGS=-O2 -std=c++17 CXXFLAGS=-O2 -std=c++17
LDFLAGS=-std=c++17 LDFLAGS=-std=c++17

View File

@ -10,7 +10,7 @@ inline void parallel_for_each(It a, It b, F&& f)
using data_t = std::pair<It, F>; using data_t = std::pair<It, F>;
data_t helper = data_t(a, std::forward<F>(f)); data_t helper = data_t(a, std::forward<F>(f));
dispatch_apply_f(count, dispatch_apply_f(count,
dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), dispatch_get_global_queue(QOS_CLASS_USER_INTERACTIVE, 0),
&helper, &helper,
[](void* ctx, size_t cnt) { [](void* ctx, size_t cnt) {
data_t* d = static_cast<data_t*>(ctx); data_t* d = static_cast<data_t*>(ctx);