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

Lock: Add lock mechanism with array of input sigs #611

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

Catya3
Copy link
Collaborator

@Catya3 Catya3 commented May 9, 2024

Name TBD

This is used when you have multiple sig and you want to wait on all of them to do something. A very common scenario.

:start -> (0 -> polyLock:data)
0 -> println -> polyLock:sig[0]
1 -> println -> polyLock:sig[1]
2 -> println -> polyLock:sig[2]
polyLock -> :stop

@emil14
Copy link
Collaborator

emil14 commented May 10, 2024

A very common scenario

  1. If that's the case, please add some examples :)
  2. What do you think about updating Lock instead of adding new component?
  3. About having this in a separate package e.g. sync.PolyLock?
  4. About name like WaitGroup? People familiar with go immediately understand what is this. Especially if it's gonna be sync.WaitGroup

@emil14
Copy link
Collaborator

emil14 commented May 10, 2024

We decided to create sync package

@emil14
Copy link
Collaborator

emil14 commented May 10, 2024

BTW other names could be LockAll or LockMany

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.

None yet

2 participants