This special synchronization mechanism allows to lock the critical code and make it exclusive for the first thread reaching this method.
All other CThread objects that operate on the same ThreadHandler are blocked until the thread unlocks the critical code.