Skip to content

class ‘PythonQtScriptingConsole’ doesn't work well after multithreading is enabled #40

Description

@dawnrs

I found that when I enable multithreading support, I have to apply macro ‘PYTHONQT_GIL_SCOPE’ to the whole message loop to make class ‘PythonQtScriptingConsole’ work well.
In general, this seems OK, but when I wanted to use macro 'PYTHONQT_ALLOW_THREADS_SCOPE' when the console was running, I found that I couldn't solve the problem.
As you know, when macro 'PYTHONQT_GIL_SCOPE' exists, macro 'PYTHONQT_ALLOW_THREADS_SCOPE' is temporarily disabled.
Therefore, when the class ‘PythonQtScriptingConsole’ does not execute any code at this time, the python thread created previously will not have a chance to be executed.
So I think if class ‘PythonQtScriptingConsole’ can support multithreading, class ‘PythonQtScriptingConsole’ will be better.

Activity

  1. YuDe95 commented on Aug 11, 2021

    @YuDe95

    Have you solved the problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions