-
Notifications
You must be signed in to change notification settings - Fork 411
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
Use ThreadFactory to auto set thread attributes #2496
Conversation
/run-all-tests |
/run-all-tests |
/run-all-tests |
dbms/src/Common/ThreadCreator.h
Outdated
/// 2. ThreadName | ||
/// | ||
/// ThreadCreator should only be constructed on stack. | ||
class ThreadCreator |
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.
Maybe name with ThreadFactory
?
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.
done
/run-all-tests |
template <typename F, typename ... Args> | ||
ThreadPool::Job newJob(F && f, Args &&... args) | ||
{ | ||
auto memory_tracker = current_memory_tracker; |
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.
Who will provide the current_memory_tracker
in current thread?
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.
Currently only ProcessListElement
's ctor.
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
/run-all-tests |
/merge |
Your auto merge job has been accepted, waiting for:
|
/run-all-tests |
part of #2499