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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: Distributed Semaphore #1109

Open
debuggerpk opened this issue Jan 19, 2023 · 0 comments
Open

RFC: Distributed Semaphore #1109

debuggerpk opened this issue Jan 19, 2023 · 0 comments

Comments

@debuggerpk
Copy link

debuggerpk commented Jan 19, 2023

First of all, thank-you for creating this awesome library. 馃槏

We need to control the number of parallel running jobs. For a single machine, We would use a semaphore to implement this. However, for our current requirements, the semaphore needs to be central. Our team thought of using etcd to implement the said semaphore using a combination of distributed lock and the key/value store before we came across this library.

The question here is, would it make sense to add a distributed semaphore primitive here or the concept can be implemented using atomix.Counter with atomix.Mutex.

PS: my understanding of semaphore and mutex is, A Mutex is a Semaphore with size 1.

Thank-you again.

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

No branches or pull requests

1 participant