Skip to content

Commit

Permalink
optimize with asm and recorder asm
Browse files Browse the repository at this point in the history
  • Loading branch information
chenqy4933 committed Aug 7, 2023
1 parent 16a0265 commit 20b308e
Show file tree
Hide file tree
Showing 2 changed files with 372 additions and 106 deletions.
8 changes: 4 additions & 4 deletions src/core/thread_pool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ ThreadPool::ThreadPool(uint32_t threads_num)
m_workers[i]->work_flag = false;
}
//! Wait next task coming
std::this_thread::yield();
//std::this_thread::yield();
}
{
std::unique_lock<std::mutex> lock(m_mutex);
Expand Down Expand Up @@ -79,9 +79,9 @@ inline void ThreadPool::sync() {
break;
}
}
if (no_finished) {
std::this_thread::yield();
}
// if (no_finished) {
// std::this_thread::yield();
// }
} while (no_finished);
}
inline void ThreadPool::active() {
Expand Down
Loading

0 comments on commit 20b308e

Please sign in to comment.