Skip to content

[pyroot] adjust GUI events processing #13745

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Sep 28, 2023

Conversation

linev
Copy link
Member

@linev linev commented Sep 28, 2023

First of all, make handling for Mac and Linux similar.
In non-interactive mode run special thread where gSystem->ProcessEvents() are called.
In interactive mode try to use input hook.

In webgui in python non-interactive mode allow to use calling thread for callbacks invocation.
It is the only chance to get processing of http requests from clients.

Probably fixes #13744

When python non-interactive session runs, there is no any possibility
to call callbacks in main thread. Therefore let allow process callbacks
directly from the place where data queue is filled.
In interactive python mode processing events always runs from main
thread and performed regularly - no special settings are required then
In non-interactive mode one have to run events from special thread,
in interactive it should be enough to use input hook
@phsft-bot
Copy link

Starting build on ROOT-performance-centos8-multicore/soversion, ROOT-ubuntu2204/nortcxxmod, ROOT-ubuntu2004/python3, mac11/noimt, mac12arm/cxx20, windows10/default
How to customize builds

@linev linev added this to the 6.30/00 milestone Sep 28, 2023
@linev linev requested a review from dpiparo September 28, 2023 09:27
@dpiparo
Copy link
Member

dpiparo commented Sep 28, 2023

Thanks. It works on my local machine which I used to create the reproducer. Let's see what the CI has to say about other platforms.

@dpiparo dpiparo self-requested a review September 28, 2023 11:45
Copy link
Member

@dpiparo dpiparo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

It is intended behavior that processing thread may change in python.
Therefore display such message only if debug is enabled
@phsft-bot
Copy link

Starting build on ROOT-performance-centos8-multicore/soversion, ROOT-ubuntu2204/nortcxxmod, ROOT-ubuntu2004/python3, mac11/noimt, mac12arm/cxx20, windows10/default
How to customize builds

@linev linev merged commit 5898c8f into root-project:master Sep 28, 2023
@phsft-bot
Copy link

Build failed on mac12arm/cxx20.
Running on macphsft26.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build
See console output.

@linev linev deleted the python_processevents branch February 19, 2025 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[PyROOT, Graphics] Cannot pause pyROOT script with input() and see canvases
3 participants