Definition at line 553 of file KisDocument.cpp.
◆ StrippedSafeSavingLocker()
| KisDocument::Private::StrippedSafeSavingLocker::StrippedSafeSavingLocker |
( |
QMutex * | savingMutex, |
|
|
KisImageSP | image ) |
|
inline |
Initial try to lock both objects. Locking the image guards us from any image composition threads running in the background, while savingMutex guards us from entering the saving code twice by autosave and main threads.
Since we are trying to lock multiple objects, so we should do it in a safe manner.
Definition at line 555 of file KisDocument.cpp.
560
561 {
571 m_locked = std::try_lock(m_imageLock, *m_savingLock) < 0;
572
573 if (!m_locked) {
575 QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
576
577
578 m_locked = std::try_lock(m_imageLock, *m_savingLock) < 0;
579 }
580 }
KisImageReadOnlyBarrierLock m_imageLock
References m_image, m_imageLock, m_locked, m_savingLock, and KisImage::requestStrokeEnd().
◆ ~StrippedSafeSavingLocker()
| KisDocument::Private::StrippedSafeSavingLocker::~StrippedSafeSavingLocker |
( |
| ) |
|
|
inline |
◆ successfullyLocked()
| bool KisDocument::Private::StrippedSafeSavingLocker::successfullyLocked |
( |
| ) |
const |
|
inline |
◆ m_image
| KisImageSP KisDocument::Private::StrippedSafeSavingLocker::m_image |
|
private |
◆ m_imageLock
| KisImageReadOnlyBarrierLock KisDocument::Private::StrippedSafeSavingLocker::m_imageLock |
|
private |
◆ m_locked
| bool KisDocument::Private::StrippedSafeSavingLocker::m_locked |
|
private |
◆ m_savingLock
| QMutex* KisDocument::Private::StrippedSafeSavingLocker::m_savingLock |
|
private |
The documentation for this class was generated from the following file: