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

Refactor sync.Cond example #361

Merged
merged 1 commit into from
Sep 5, 2024
Merged

Refactor sync.Cond example #361

merged 1 commit into from
Sep 5, 2024

Conversation

sh4msi
Copy link
Contributor

@sh4msi sh4msi commented Jun 25, 2024

  • Extract common goroutine logic into an external function waitForResourceUpdate.
  • Rename variables for better clarity:
    • sharedRsc to sharedResource
    • m to locker
    • c to condition
  • Add comments to explain the purpose and flow of the code.

- Extract common goroutine logic into an external function `waitForResourceUpdate`.
- Rename variables for better clarity:
  - `sharedRsc` to `sharedResource`
  - `m` to `locker`
  - `c` to `condition`
- Add comments to explain the purpose and flow of the code.
@Ja7ad Ja7ad merged commit 8feef23 into GoFarsi:main Sep 5, 2024
2 checks passed
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.

2 participants