QReadWriteLock
最后更新于:2022-04-02 02:12:58
[TOC]
## QReadWriteLock
```
QReadWriteLock lock;
void ReaderThread::run()
{
...
lock.lockForRead();
read_file();
lock.unlock();
...
}
void WriterThread::run()
{
...
lock.lockForWrite();
write_file();
lock.unlock();
...
}
```
';