Hold the GIL when checking QgsFeedback.isCanceled()

This commit is contained in:
Nyall Dawson 2021-05-12 12:27:04 +10:00
parent abf5c9754c
commit 03e84c775c
2 changed files with 4 additions and 4 deletions

View File

@ -40,7 +40,7 @@ gets canceled, the :py:func:`~cancel` method is called on the feedback object of
Construct a feedback object Construct a feedback object
%End %End
bool isCanceled() const; bool isCanceled() const /HoldGIL/;
%Docstring %Docstring
Tells whether the operation has been canceled already Tells whether the operation has been canceled already
%End %End
@ -57,7 +57,7 @@ argument is in percentage and valid values range from 0-100.
.. versionadded:: 3.0 .. versionadded:: 3.0
%End %End
double progress() const; double progress() const /HoldGIL/;
%Docstring %Docstring
Returns the current progress reported by the feedback object. Depending on how the Returns the current progress reported by the feedback object. Depending on how the
feedback object is used progress reporting may not be supported. The returned value feedback object is used progress reporting may not be supported. The returned value

View File

@ -51,7 +51,7 @@ class CORE_EXPORT QgsFeedback : public QObject
{} {}
//! Tells whether the operation has been canceled already //! Tells whether the operation has been canceled already
bool isCanceled() const { return mCanceled; } bool isCanceled() const SIP_HOLDGIL { return mCanceled; }
/** /**
* Sets the current progress for the feedback object. The \a progress * Sets the current progress for the feedback object. The \a progress
@ -77,7 +77,7 @@ class CORE_EXPORT QgsFeedback : public QObject
* \see progressChanged() * \see progressChanged()
* \since QGIS 3.0 * \since QGIS 3.0
*/ */
double progress() const { return mProgress; } double progress() const SIP_HOLDGIL { return mProgress; }
public slots: public slots: