!7573 [JIT] set priority for JIT thread

Merge pull request !7573 from wzlgit/jit_priority
This commit is contained in:
openharmony_ci 2024-05-30 02:44:48 +00:00 committed by Gitee
commit 57938acb7e
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -67,6 +67,8 @@ public:
{
Taskpool::Initialize(0, [](os::thread::native_handle_type thread) {
os::thread::SetThreadName(thread, "OS_JIT_Thread");
constexpr int32_t priorityVal = 5; // 5: The priority can be set within range [-20, 19]
os::thread::SetPriority(os::thread::GetCurrentThreadId(), priorityVal);
auto jitVm = JitVM::Create();
JitTaskpool::GetCurrentTaskpool()->SetCompilerVm(jitVm);
}, []([[maybe_unused]] os::thread::native_handle_type thread) {