-
Notifications
You must be signed in to change notification settings - Fork 452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce TBB to refactor task runners #1323
Conversation
@@ -35,7 +35,7 @@ concurrency: | |||
jobs: | |||
check-and-lint: | |||
name: Lint and check code | |||
runs-on: ubuntu-20.04 | |||
runs-on: ubuntu-22.04 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need newer clang-tidy (version 12 -> 14) so that a bug (false report) in the old version (clang-tidy 12) will be fixed, and does not fail the CI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Do we plan to optimize more places with TBB in the future? |
Sure. |
Merging... |
We refactor the TaskRunner class using blocking queues (tbb::concurrent_bounded_queue) in oneTBB (https://github.com/oneapi-src/oneTBB).
oneTBB provides more utilities about threads which can be used in kvrocks, like spin locks, rw mutex (more efficient), concurrent map, set, vector, and queue, concurrent algorithms, task arena, task scheduler (which has some difference than task runners), and task graphs.