TODO: mutex conditional variable skeleton