|
Krita Source Code Documentation
|
a simple singleton class for tracking busy-waits on the image and breaking deadlock ties when needed. More...
#include <KisBusyWaitBroker.h>
Classes | |
| struct | Private |
Public Member Functions | |
| bool | guiThreadIsWaitingForBetterWeather () const |
| KisBusyWaitBroker () | |
| void | notifyGeneralWaitEnded () |
| void | notifyGeneralWaitStarted () |
| void | notifyWaitOnImageEnded (KisImage *image) |
| void | notifyWaitOnImageStarted (KisImage *image) |
| void | setFeedbackCallback (std::function< void(KisImageSP)> callback) |
| ~KisBusyWaitBroker () | |
Static Public Member Functions | |
| static KisBusyWaitBroker * | instance () |
Private Member Functions | |
| Q_DISABLE_COPY (KisBusyWaitBroker) | |
Private Attributes | |
| QScopedPointer< Private > | m_d |
a simple singleton class for tracking busy-waits on the image and breaking deadlock ties when needed.
When KisImage::barrierLock()/waitForDone() goes into sleep, waiting for the worker threads to finish, it notifies KisBusyWaitBroker about that. Therefore worker threads know that GUI thread is inactive now and can resolve the ties.
Definition at line 20 of file KisBusyWaitBroker.h.
| KisBusyWaitBroker::KisBusyWaitBroker | ( | ) |
Definition at line 31 of file KisBusyWaitBroker.cpp.
| KisBusyWaitBroker::~KisBusyWaitBroker | ( | ) |
Definition at line 36 of file KisBusyWaitBroker.cpp.
| bool KisBusyWaitBroker::guiThreadIsWaitingForBetterWeather | ( | ) | const |
Definition at line 103 of file KisBusyWaitBroker.cpp.
References m_d.
|
static |
Definition at line 40 of file KisBusyWaitBroker.cpp.
| void KisBusyWaitBroker::notifyGeneralWaitEnded | ( | ) |
Definition at line 90 of file KisBusyWaitBroker.cpp.
References m_d.
| void KisBusyWaitBroker::notifyGeneralWaitStarted | ( | ) |
Definition at line 82 of file KisBusyWaitBroker.cpp.
References m_d.
Definition at line 65 of file KisBusyWaitBroker.cpp.
References KIS_SAFE_ASSERT_RECOVER_NOOP, and m_d.
Definition at line 45 of file KisBusyWaitBroker.cpp.
References m_d, and KisShared::refCount().
|
private |
| void KisBusyWaitBroker::setFeedbackCallback | ( | std::function< void(KisImageSP)> | callback | ) |
Set a callback that is called before image goes into sleep. This callback may show the user some feedback window with a progress bar.
This callback is expected to be initialized during the construction of KisPart.
Definition at line 98 of file KisBusyWaitBroker.cpp.
References m_d.
|
private |
Definition at line 56 of file KisBusyWaitBroker.h.