Solving deadlock for production