Skip to content

sync: add condition support #24574

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 6 commits into
base: master
Choose a base branch
from
Open

Conversation

kbkpbot
Copy link
Contributor

@kbkpbot kbkpbot commented May 25, 2025

Just like go.Cond.

Copy link

Connected to Huly®: V_0.6-22939

@enghitalo
Copy link
Contributor

Why do you have an array of Channels?
If you are using Channels, why are you blocking the thread with a mutex?

@kbkpbot
Copy link
Contributor Author

kbkpbot commented May 25, 2025

Why do you have an array of Channels? If you are using Channels, why are you blocking the thread with a mutex?

  1. We can replace array of channels with array of semaphores. This is just for signal, broadcast working.
  2. By using channels, we can use select with timeout.
  3. Before enter wait, a user-defined mutex must be held.

Copy link
Member

@spytheman spytheman left a comment

Choose a reason for hiding this comment

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

Excellent work.

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