unlock the resource mutex before executing the users code when entering resources