Definition at line 554 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 556 of file KisDocument.cpp.
561
562 {
572 m_locked = std::try_lock(m_imageLock, *m_savingLock) < 0;
573
574 if (!m_locked) {
576 QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
577
578
579 m_locked = std::try_lock(m_imageLock, *m_savingLock) < 0;
580 }
581 }
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: