mutex needs to exclude recv as well