Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Compliant Solution (Using cnd_signal() but with a Unique Condition Variable per Thread)

Another compilant compliant solution is to use a unique condition variable for each thread (all associated with a single mutex). In this case, the signal operation (cnd_signal()) wakes up only the thread that is waiting on it. This solution is more efficient than using cnd_broadcast() because only the desired thread is awakened.

...