Skip to content
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: info cache create in other thread #2237

Merged
merged 1 commit into from
Aug 30, 2024

Conversation

liyigang1
Copy link
Contributor

info cache create in other thread

Log: info cache create in other thread

max-lvs
max-lvs previously approved these changes Aug 29, 2024
info cache create in other thread

Log: info cache create in other thread
@deepin-ci-robot
Copy link

deepin pr auto review

关键摘要:

  • regClass函数中添加了断言来检查当前线程是否为主线程,这可能是为了确保InfoCacheController实例在主线程中创建。
  • 使用std::call_once来确保InfoCacheController的实例只会在主线程中创建一次。

是否建议立即修改:

  • 否,当前提交的代码没有明显的语法或逻辑错误。
  • 是,建议添加注释来解释为什么需要在主线程中创建InfoCacheController实例,以及std::call_once的使用目的。
  • 是,建议添加单元测试来验证InfoCacheController实例创建的线程安全性,以确保代码的健壮性。

@Johnson-zs Johnson-zs merged commit 0f1e987 into linuxdeepin:master Aug 30, 2024
25 of 27 checks passed
@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Johnson-zs, liyigang1

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants