mirror of
https://github.com/topjohnwu/Magisk.git
synced 2026-07-03 14:08:39 +02:00
@@ -42,8 +42,6 @@ static void reset_pool() {
|
||||
}
|
||||
|
||||
static void *thread_pool_loop(void * const is_core_pool) {
|
||||
pthread_atfork(nullptr, nullptr, &reset_pool);
|
||||
|
||||
// Block all signals
|
||||
sigset_t mask;
|
||||
sigfillset(&mask);
|
||||
@@ -83,6 +81,10 @@ static void *thread_pool_loop(void * const is_core_pool) {
|
||||
}
|
||||
}
|
||||
|
||||
void init_thread_pool() {
|
||||
pthread_atfork(nullptr, nullptr, &reset_pool);
|
||||
}
|
||||
|
||||
void exec_task(function<void()> &&task) {
|
||||
mutex_guard g(lock);
|
||||
pending_task.swap(task);
|
||||
|
||||
Reference in New Issue
Block a user