Skip to content

Cleanup timer in signal blocker from the correct thread#649

Open
flowln wants to merge 1 commit intopytest-dev:masterfrom
flowln:fix/timer_stop_threaded
Open

Cleanup timer in signal blocker from the correct thread#649
flowln wants to merge 1 commit intopytest-dev:masterfrom
flowln:fix/timer_stop_threaded

Conversation

@flowln
Copy link
Copy Markdown

@flowln flowln commented May 6, 2026

According to the PySide6 documentation on QTimer:

Qt uses the timer’s thread affinity to determine which thread will emit the timeout() signal.
Because of this, you must start and stop the timer in its thread;

Because of that, we need to schedule the stop invokation to run in the timer's parent thread. This ensures correct behavior when handling signals emitted from different threads.

According to the PySide6 documentation on QTimer:

Qt uses the timer’s thread affinity to determine which thread will emit
the timeout() signal.
Because of this, you must start and stop the timer in its thread;

Because of that, we need to schedule the stop invokation to run in the
timer's parent thread.

Signed-off-by: Sofia Donato Ferreira <sofia.ferreira@lnls.br>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant