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

23 lines
1.0 KiB
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.

![[第19章(1课时已更新.ppt]]第19章重点线程的使用子类化和线程同步锁和信号量
![[fd4fbf294881512f4a25b16894c2c7ec_.png]]
![[85742fec35bea44361c110e5d9934595_.png]]
一个简单的线程示例,显示当前时间,通过信号槽发送到主线程。
这是我以前写的共享内存的实例代码,共享内存的优先级可以放在后面。
![[027d147db3a0ebe921fd9ad2e9664076_115f7bca329ae801314a770f5d12bdaa_8.zip]]
![[9bfbc9579e6bae78e3887c20a924a060_a82e3bb329e4a61e49d2ee60c669447a_8 1.zip]]
线程和锁的示例:
![[4ae3509a77bbba8eb07fa1aa3d5cdebd_.png]]
![[e126ed32ceb5545b7dc71b6d505d9d8d_.png]]
![[85d88d848f33e6741bd89f976b0799a3_.png]]
一个简单的锁的样例
读锁是不阻塞的
![[a664b00245443af2610ed85316be5baa_.png]]
![[13a1d2593a339ca6e1dd82d2e4c666cf_.png]]
读写锁之间是阻塞的
![[6994f7ae22e288920d7f8c48131a7863_.png]]
![[1aee77a18abcc6bd172fafd345914a25_.png]]
![[601af90279996ffd05fc554b3655fdc2_.png]]
![[faf3e195b449015d171c7627d01bd55b_.png]]