That is, write your code so that only a single task will clear the memory-mode event before any task attempts to post the event. When an event variable is not passed to the event routines, the routines operate in eureka mode. In eureka mode, the hardware barrier network is used for event communication. When a shared event variable is passed to the event routines, the shared variable is used for event communication. Memory mode is less efficient than eureka mode, but it is considerably more flexible.
Eureka synchronization has several uses, including database searches.
Using eureka synchronization, you can stop a database search as soon as any PE finds the data rather than waiting for all of the PEs to exhaust the search. In eureka mode, all tasks must clear the event before any task can test, wait for, or post the event, but all tasks need not wait for a eureka event to be posted. However, all tasks must once again clear the event before another eureka activity can begin. Events in eureka mode cannot be posted across barriers.