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: multi-threaded problems in counter #58

Merged
merged 1 commit into from
Aug 1, 2024

Conversation

wolfbolin
Copy link
Contributor

Resolve two program:

  1. too large number variable when increment
  2. function increment and read not in same time

We can use native solution enhance it.
Tips: This PR still doesn't solve security in multiprocessing.

Reference python doc
GIL: https://wiki.python.org/moin/GlobalInterpreterLock
itertools: https://docs.python.org/3/library/itertools.html#itertools.cycle

Signed-off-by: WolfBolin <wolfbolin@foxmail.com>
@shoothzj shoothzj changed the title fix: openGemini#47 multi-threaded problems fix: multi-threaded problems in counter Aug 1, 2024
@shoothzj shoothzj merged commit 7eacfd7 into openGemini:main Aug 1, 2024
7 checks passed
This was referenced Aug 4, 2024
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.

3 participants