diff options
| author | Thiago Macieira <thiago.macieira@intel.com> | 2023-04-17 16:48:51 -0700 |
|---|---|---|
| committer | Thiago Macieira <thiago.macieira@intel.com> | 2023-05-11 12:31:56 -0700 |
| commit | 34914099a1044beba7fdd1b71b079c4130ca0cd4 (patch) | |
| tree | 1c91a83bf1f26f4186d2f77572c99a933e6b8fa7 /src/corelib/thread/qreadwritelock.cpp | |
| parent | 834c755977bbfe66e041aba6d2dfa69954eb3808 (diff) | |
QReadWriteLock: remove the untimed tryLockForXxxx functions
They're unnecessary now because the timed function is fast enough.
Note: the default argument will move to the QDeadlineTimer functions
before the Qt 6.6 release.
Change-Id: I3d728c4197df49169066fffd1756ddc0e4f796d3
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/corelib/thread/qreadwritelock.cpp')
| -rw-r--r-- | src/corelib/thread/qreadwritelock.cpp | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/src/corelib/thread/qreadwritelock.cpp b/src/corelib/thread/qreadwritelock.cpp index fd60fb09341..7e29aa3905c 100644 --- a/src/corelib/thread/qreadwritelock.cpp +++ b/src/corelib/thread/qreadwritelock.cpp @@ -146,27 +146,6 @@ void QReadWriteLock::lockForRead() } /*! - Attempts to lock for reading. If the lock was obtained, this - function returns \c true, otherwise it returns \c false instead of - waiting for the lock to become available, i.e. it does not block. - - The lock attempt will fail if another thread has locked for - writing. - - If the lock was obtained, the lock must be unlocked with unlock() - before another thread can successfully lock it for writing. - - It is not possible to lock for read if the thread already has - locked for write. - - \sa unlock(), lockForRead() -*/ -bool QReadWriteLock::tryLockForRead() -{ - return tryLockForRead(0); -} - -/*! \overload Attempts to lock for reading. This function returns \c true if the lock was obtained; otherwise it returns \c false. If another thread @@ -266,27 +245,6 @@ void QReadWriteLock::lockForWrite() } /*! - Attempts to lock for writing. If the lock was obtained, this - function returns \c true; otherwise, it returns \c false immediately. - - The lock attempt will fail if another thread has locked for - reading or writing. - - If the lock was obtained, the lock must be unlocked with unlock() - before another thread can successfully lock it. - - It is not possible to lock for write if the thread already has - locked for read. - - \sa unlock(), lockForWrite() -*/ -bool QReadWriteLock::tryLockForWrite() -{ - return tryLockForWrite(0); -} - -/*! \overload - Attempts to lock for writing. This function returns \c true if the lock was obtained; otherwise it returns \c false. If another thread has locked for reading or writing, this function will wait for at |
