Jump to content

C++ Language/Std/Multithreading/Semaphores/FragmentOrdering

From Wikibooks, open books for an open world

A semaphore can be used to order the execution of code fragments in different threads. In this case, the "resource" isn't a physical thing, it's permission to execute the subsequent code fragment.

Additional information about using a semaphore for fragment ordering