Avoid using of pointers to mutexes and conditions