-
Notifications
You must be signed in to change notification settings - Fork 471
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
Fix cyclic compilation: Use vendored once_cell #1154
Conversation
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.
I would prefer to use the OnceLock terminology from std if we're going to use a Sync type, because I have already gotten used to the Cell vs. Lock distinction in my personal usage of these APIs.
I'm requested as a reviewer, but I'll leave my review to @workingjubilee, feel free to land when she's satisfied. |
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
The function could have exclusive access to the data, so it does not need any synchronization. Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
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.
Thanks, this looks much better.
let helper_thread = if let Some(thread) = self.helper_thread.as_ref() { | ||
thread | ||
} else { | ||
self.helper_thread | ||
.insert(HelperThread::new(self.jobserver)?) | ||
}; |
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.
Much nicer.
Fix #1146