To quote from an answer in Lock, mutex, semaphore... what's the difference?
A lock allows only one thread to enter the part that's locked and the lock is not shared with any other processes.
A mutex is the same as a lock but it can be system wide (shared by multiple processes).
A semaphore does the same as a mutex but allows x number of threads to en
This is what I'm confused about: multiprocessing
does fork/spawn new processes, right? So even though multiprocessing.Lock
is called "lock", is it not really a lock but a mutex or semaphore?