19 lines
483 B
C++
19 lines
483 B
C++
/*
|
|
* Copyright 2010-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
|
* that can be found in the LICENSE file.
|
|
*/
|
|
|
|
namespace kotlin {
|
|
|
|
#if KONAN_WINDOWS
|
|
// TODO: Figure out why creating many threads on windows is so slow.
|
|
constexpr int kDefaultThreadCount = 10;
|
|
#elif __has_feature(thread_sanitizer)
|
|
// TSAN has a huge overhead.
|
|
constexpr int kDefaultThreadCount = 10;
|
|
#else
|
|
constexpr int kDefaultThreadCount = 100;
|
|
#endif
|
|
|
|
} // namespace kotlin
|