Skip to content

Commit

Permalink
Activate dispatch backend on Linux
Browse files Browse the repository at this point in the history
Linux is the only platform where slow QThreadPool is used, let's use dispatch here as well
  • Loading branch information
ilya-fedin authored and john-preston committed Dec 22, 2021
1 parent ec103d6 commit 3fde21b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,12 @@ PUBLIC
if (LINUX)
target_link_libraries(lib_crl
PUBLIC
desktop-app::external_dispatch
pthread
)
elseif (build_macstore)
endif()

if (build_macstore OR LINUX)
target_compile_definitions(lib_crl
PUBLIC
CRL_USE_COMMON_QUEUE
Expand Down
13 changes: 11 additions & 2 deletions crl/common/crl_common_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,21 @@
#define CRL_USE_WINAPI_LIST
#endif // !CRL_FORCE_STD_LIST

#elif defined __APPLE__ && !defined CRL_FORCE_QT // _MSC_VER && !CRL_FORCE_QT
#elif !defined CRL_FORCE_QT // _MSC_VER && !CRL_FORCE_QT

// gcc compatibility
#ifndef __has_feature
#define __has_feature(x) 0
#endif // !__has_feature

#ifndef __has_extension
#define __has_extension __has_feature
#endif // !__has_extension

#define CRL_USE_DISPATCH
#define CRL_USE_COMMON_LIST

#elif __has_include(<QtCore/QThreadPool>) // __APPLE__ && !CRL_FORCE_QT
#elif __has_include(<QtCore/QThreadPool>) // !CRL_FORCE_QT

#define CRL_USE_QT
#define CRL_USE_COMMON_LIST
Expand Down

0 comments on commit 3fde21b

Please sign in to comment.