added example: fix the deadlock