Use mutex instead of variable for RC check