OS经典问题Python实现----工人搬水

问题: 搬运工人向卡车中装纯净水,每车最多10箱。卡车装满即开走,需装n辆车。   import random import threading import time water= threading.Semaphore(0); go= threading.Semaphore(0); mutex=threading.Event() wmutex=threading.Event()
相关文章
相关标签/搜索