Example program for the tango.core.sync.Barrier module.
Test for multi-process semaphores: this test works by creating a copy of this process that tries to acquire the ProcessSemaphore that was created in this function. If everything works as expected, the attempt should fail, as the count of the semaphore is set to 1.
Test for multi-process semaphores (second process).
Test for single-process (multi-threaded) semaphores.