8000 opt(annotation): support concurrently register and find `Annotation` by AsterDY · Pull Request #100 · cloudwego/dynamicgo · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

opt(annotation): support concurrently register and find Annotation #100

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

AsterDY
Copy link
Collaborator
@AsterDY AsterDY commented Apr 27, 2025

What type of PR is this?

Check the PR title.

  • This PR title match the format: <type>(optional scope): <description>
  • The description of this PR title is user-oriented and clear enough for others to understand.
  • Attach the PR updating the user documentation if the current PR requires user awareness at the usage level. User docs repo

(Optional) Translate the PR title into Chinese.

(Optional) More detailed description for this PR(en: English/zh: Chinese).

en: support concurrently register and find Annotation
zh(optional): 支持并发注册和获取Annotation

(Optional) Which issue(s) this PR fixes:

(optional) The PR that updates user documentation:

@AsterDY AsterDY changed the title opt:(thrift) support concurrently register and find Annotation opt(annotation): support concurrently register and find Annotation May 6, 2025
if m == nil {
m = make(map[AnnoScope]Annotation)
annotations[key] = m
m = new(sync.Map)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里不加锁的话会漏注册的吧?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个没办法,即使并发重复key注册上了,使用时候可能还是有bug。除非整个idl解析流程都加锁(串行)

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

Successfully merging this pull request may close these issues.

2 participants
0