Skip to content

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

Open
@dawnrs

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.

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