QReadWriteLock上锁容忍的等待时间是多久?

非递归上锁情况下,同一个锁,已经被锁过一次,那么另外一个线程尝试上锁,会被挡在外面,但是会被挡多久呢?挡一分钟会被崩溃,还十分钟,还是永久等待而不崩溃(希望如此)?还是会立刻崩溃?因为不可以重复上锁。

enum QReadWriteLock::RecursionMode

ConstantValueDescription
QReadWriteLock::Recursive 1 In this mode, a thread can lock the same QReadWriteLock multiple times. TheQReadWriteLock won't be unlocked until a corresponding number of unlock() calls have been made.
QReadWriteLock::NonRecursive 0 In this mode, a thread may only lock a QReadWriteLock once.

This enum was introduced or modified in Qt 4.4.

See also QReadWriteLock().

原文地址:https://www.cnblogs.com/findumars/p/5601936.html