Definition at line 556 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 558 of file KisDocument.cpp.
563
564 {
574 m_locked = std::try_lock(m_imageLock, *m_savingLock) < 0;
575
576 if (!m_locked) {
578 QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
579
580
581 m_locked = std::try_lock(m_imageLock, *m_savingLock) < 0;
582 }
583 }
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: