Top "Semaphore" questions

A semaphore is a synchronization primitive that tracks how many of a limited number of resources are available.

Is there any mutex/semaphore mechanism in shell scripts?

I'm looking for mutex/semaphore/concurrency mechanism in shell script. Consider following situation: Unless "a" user does not close the …

bash shell unix concurrency semaphore
sem_init on OS X

I am working on some code which uses the pthread and semaphore libraries. The sem_init function works fine on …

c macos pthreads semaphore
pthread_cond_wait versus semaphore

What are the pros / cons of using pthread_cond_wait or using a semaphore ? I am waiting for a state …

c multithreading semaphore
How do I recover a semaphore when the process that decremented it to zero crashes?

I have multiple apps compiled with g++, running in Ubuntu. I'm using named semaphores to co-ordinate between different processes. All …

linux gcc g++ semaphore
Throttling asynchronous tasks

I would like to run a bunch of async tasks, with a limit on how many tasks may be pending …

c# async-await semaphore throttling tpl-dataflow
How to initialise a binary semaphore in C

In the man page it appears that even if you initialise a semaphore to a value of one: sem_init(&…

c linux semaphore init
sem_open() error: "undefined reference to sem_open()" on linux (Ubuntu 10.10)

So I am getting the error: "undefined reference to sem_open()" even though I have include the semaphore.h header. …

c++ linux semaphore
Differences between System V and Posix semaphores

What are the trade-offs between using a System V and a Posix semaphore?

unix comparison posix semaphore tradeoff
How do I choose between Semaphore and SemaphoreSlim?

Their public interfaces appear similar. The documentation states that the SemaphoreSlim is a lightweight alternative and doesn't use Windows Kernel …

c# multithreading semaphore
How can I tell if another instance of my program is already running?

How do i tell if one instance of my program is running? I thought I could do this with a …

delphi persistence mutex instance semaphore