Top "Semaphore" questions

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

POSIX Semaphores on Mac OS X: sem_timedwait alternative

I am trying to port a project (from linux) that uses Semaphores to Mac OS X however some of the …

macos unix posix semaphore
What are the practical uses of semaphores?

Nonbinary ones.. I have never encountered a problem that required me to use a semaphore instead of mutex. So is …

mutex semaphore
semaphore_tracker: There appear to be 1 leaked semaphores to clean up at shutdown len(cache))

I was run an autokeras code via python3.6. There is a warning like this after trained one model: Saving model. +…

python-3.x multiprocessing semaphore auto-keras
List named semaphores

Is there a way to list all posix-named-semaphores, ipcs doesn't seem to give any info about posix semaphores e.g. …

posix semaphore ubuntu-10.04
dispatch_semaphore_t reuse - What am I missing here?

I have some code where I am using dispatch_semaphore_t to signal operation completion. When the semaphore is a …

objective-c grand-central-dispatch semaphore nsthread
When to call sem_unlink()?

I'm a little confused by the Linux API sem_unlink(), mainly when or why to call it. I've used semaphores …

linux semaphore
How to wait until buffered channel (semaphore) is empty?

I have a slice of integers, which are manipulated concurrently: ints := []int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10} I'm using a buffered channel as semaphore in …

go semaphore channel goroutine
Semaphore Wait vs WaitAsync in an async method

I'm trying to find out what is the difference between the SemaphoreSlim use of Wait and WaitAsync, used in this …

c# concurrency semaphore synchronizationcontext
objective-c : @synchronized, how does it work?

i have two methods -(void) a { @synchronized(self) { // critical section 1 } } -(void) b { @synchronized(self) { // critical section 2 } } now my …

iphone objective-c multithreading semaphore
How can you implement a condition variable using semaphores?

A while back I was thinking about how to implement various synchronization primitives in terms of one another. For example, …

algorithm mutex semaphore condition-variable