Skip to content

Commit

Permalink
Hold the GIL when checking QgsFeedback.isCanceled()
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed May 12, 2021
1 parent abf5c97 commit 03e84c7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions python/core/auto_generated/qgsfeedback.sip.in
Expand Up @@ -40,7 +40,7 @@ gets canceled, the :py:func:`~cancel` method is called on the feedback object of
Construct a feedback object
%End

bool isCanceled() const;
bool isCanceled() const /HoldGIL/;
%Docstring
Tells whether the operation has been canceled already
%End
Expand All @@ -57,7 +57,7 @@ argument is in percentage and valid values range from 0-100.
.. versionadded:: 3.0
%End

double progress() const;
double progress() const /HoldGIL/;
%Docstring
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
Expand Down
4 changes: 2 additions & 2 deletions src/core/qgsfeedback.h
Expand Up @@ -51,7 +51,7 @@ class CORE_EXPORT QgsFeedback : public QObject
{}

//! 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
Expand All @@ -77,7 +77,7 @@ class CORE_EXPORT QgsFeedback : public QObject
* \see progressChanged()
* \since QGIS 3.0
*/
double progress() const { return mProgress; }
double progress() const SIP_HOLDGIL { return mProgress; }

public slots:

Expand Down

0 comments on commit 03e84c7

Please sign in to comment.