can you please explain the scenario which will cause deadlock here?