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