Thread synchronization with a barrier

Sometimes, an application can be divided into phases with the rule that no process can continue if first, all threads of the process have completed their own task. A barrier implements this concept: a thread that has finished its phase calls a primitive barrier and stops. When all the threads involved have finished their stage of execution and have also invoked the primitive barrier, the system unlocks them all, allowing threads to move to a later stage.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset