mutex and server thread