摘要:
A rectangle is represented as a list [x1, y1, x2, y2], where (x1, y1) are the coordinates of its bottom-left corner, and (x2, y2) are the coordinates 阅读全文
摘要:
惊群效应指的是在生产者和消费者模型中,生产者广播时,使得多个消费者产生响应。 测试:把模拟售票系统的49行改成每次只补一张票。 如果用 if , 结果 当第一次补票的时候,因为是if,所有的4个线程都做出反应,但是实际的票只能满足线程1,所以导致另外3个线程提前退出。 改用while, 结果 con 阅读全文