Example mutex deadlock protection with callstack printout