blob: f41e62817ff54e01fb76216c80c34ca8831ff746 [file] [log] [blame]
Avi Drissmane4622aa2022-09-08 20:36:061// Copyright 2018 The Chromium Authors
Leszek Swirski2987cc82018-11-05 15:19:282// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef BASE_TASK_TASK_FEATURES_H_
6#define BASE_TASK_TASK_FEATURES_H_
7
8#include "base/base_export.h"
Anthony Vallee-Dubois9dbbbda32022-08-26 01:25:319#include "base/feature_list.h"
Etienne Pierre-Dorayd6b575b22018-11-21 19:32:2910#include "base/metrics/field_trial_params.h"
Aditya Keerthia41eda52019-04-01 15:03:2511#include "build/build_config.h"
Leszek Swirski2987cc82018-11-05 15:19:2812
13namespace base {
14
Xiaohan Wangbba17e22022-01-15 17:58:1415#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE)
Francois Doray7f777312019-05-16 12:26:3116#define HAS_NATIVE_THREAD_POOL() 1
17#else
18#define HAS_NATIVE_THREAD_POOL() 0
19#endif
20
21#if HAS_NATIVE_THREAD_POOL()
Francois Dorayee4a5532021-03-30 00:17:1722// Under this feature, ThreadPoolImpl will use a foreground ThreadGroup backed
23// by a native thread pool implementation. The Windows Thread Pool API and
Aditya Keerthia41eda52019-04-01 15:03:2524// libdispatch are used on Windows and macOS/iOS respectively.
Daniel Cheng