Top "Semaphore" questions

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

Conditional Variable vs Semaphore

When should one use a semaphore and when should one use a conditional variable (CondVar) ?

multithreading operating-system synchronization semaphore mutual-exclusion
Need to understand the usage of SemaphoreSlim

Here is the code I have but I don't understand what SemaphoreSlim is doing. async Task WorkerMainAsync() { SemaphoreSlim ss = new …

c# multithreading task-parallel-library semaphore
How to share semaphores between processes using shared memory

I have to synchronize N client processes with one server. These processes are forked by a main function in which …

c synchronization client-server semaphore shared
Javascript semaphore / test-and-set / lock?

Is there such a thing as an atomic test-and-set, semaphore, or lock in Javascript? I have javascript invoking async background …

javascript concurrency semaphore
Is it possible to use mutex in multiprocessing case on Linux/UNIX ?

This is an interview question. Is it possible to use mutex in multiprocessing case on Linux/UNIX ? My idea: No, …

multithreading synchronization mutex multiprocessing semaphore
CountDownLatch vs. Semaphore

Is there any advantage of using java.util.concurrent.CountdownLatch instead of java.util.concurrent.Semaphore? As far as I …

java multithreading concurrency semaphore countdownlatch
Undefined Reference issues using Semaphores

I am playing around with using Semaphores, but I keep encountering Undefined Reference warnings, thus causing my code not to …

c semaphore undefined-reference
Using threads in C on Windows. Simple Example?

What do I need and how can I use threads in C on Windows Vista? Could you please give me …

c windows multithreading semaphore
How to use POSIX semaphores on forked processes in C?

I want to fork multiple processes and then use a semaphore on them. Here is what I tried: sem_init(&…

c linux fork shared-memory semaphore
Semaphores on Python

I've started programming in Python a few weeks ago and was trying to use Semaphores to synchronize two simple threads, …

python multithreading semaphore python-multithreading