Cookbook ooo comparator example - why no semaphore or other IPC mechanism needed?

In reply to NiLu:
Yes, ideally there should be a semaphore to guard against simultaneous access/modification. In practice, code rarely gets interrupted in the middle of a method except at a blocking statement. But that’s no excuse.