【发布时间】:2021-09-30 16:53:57
【问题描述】:
所以基本上,要请求资源并且在等待时,如果 X 秒内没有资源给予请求,我们基本上什么都不做。“客户没有得到帮助”等。
来自他们的示例代码:
print('%s arrives at the carwash at %.2f.' % (name, env.now))
with cw.machine.request() as request:
yield request
所以.. 当它请求 cw.machine.request() 时,只在删除请求之前执行一定的持续时间,例如不做任何事情。
print('%s arrives at the carwash at %.2f.' % (name, env.now))
with cw.machine.request() as request:
waiting for X seconds before exiting... is it a continous loop or how does it work?
yield request
【问题讨论】: