563 B
563 B
!第20章(1课时)已更新.ppt
QWaitCondition的使用
!
!
!
"1thread" 0
"1thread" 1
"1thread" 2
"1thread" 3
"1thread" 4
"1thread" 5
"1thread" 6
"1thread" 7 这里已经满了,无法生产了
"2thread" 0 消费一个之后
"1thread" 8 才能继续生产
"2thread" 1
"1thread" 9
"2thread" 9
!
使用两个线程是这样的。
!threadclock.cpp
!GlobalData.h
!threadclock.h