Files
Obsidian/QT/第二十章.md
2025-08-23 15:15:57 +08:00

24 lines
563 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

![[第20章(1课时已更新.ppt]]
QWaitCondition的使用
![[7941646ae9f8aeb7212bf21961ac0b79_.png]]
![[ce35786fa07e588a9538c0dad8daf521_.png]]
![[278efd24a2830685a4398e4f1faa1194_.png]]
"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
![[3451d9c3e1cfa4f092b55089d9a871b2_.png]]
使用两个线程是这样的。
![[threadclock.cpp]]
![[GlobalData.h]]
![[threadclock.h]]