Dining Philosophers problem in Python using five locks

前端 未结 0 930
死守一世寂寞
死守一世寂寞 2021-01-04 07:59

I don\'t understand this part,

with self.locks[first]:
with self.locks[second]:

How can the double nested with determines who pick the left one

相关标签:
回答
  • 消灭零回复
提交回复
热议问题