blob: 21519eaa34a67765412e44186ebfbef5d9b75785 [file] [log] [blame] [edit]
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <executorch/extension/threadpool/threadpool_guard.h>
namespace executorch::extension::threadpool {
thread_local bool NoThreadPoolGuard_enabled = false;
bool NoThreadPoolGuard::is_enabled() {
return NoThreadPoolGuard_enabled;
}
void NoThreadPoolGuard::set_enabled(bool enabled) {
NoThreadPoolGuard_enabled = enabled;
}
} // namespace executorch::extension::threadpool