Replies: 1 comment 1 reply
-
same issue |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Question
My program utilises Multiprocessing (or Process Pool Executor, which is obviously related), under some situations the GUI will duplicate, depending on how it was "built" (pack versus Build)
To run the task I use the following:
GUI thread:
The thread that is spun off from ft.page.run_task():
Within the if name = main block, I use the following, as is standard when using PyInstaller/other packagers when packing for OS's that use Spawn rather than Fork for this scenario, I believe both Windows + MacOS
Scenarios:
Flet Pack (Windows/Mac):
Flet Build (MacOS) - V0.23.2:
Flet Build Windows - V0.24.1/V0.25(dev):
Flet Run - development environment:
When creating using Flet Build, is there anything that I need to do to get this working correctly?
I have been careful not to update the GUI from the subprocesses, and use a Queue to communicate status, and to debug, I have even removed all status communication entirely - with the issue still occurring. To me, the behaviour is almost as though somewhere in the code (during Flet Build), I am missing the crucial multiprocessing.freeze_support() line of code.
Has anyone come across anything similar, or is there anything I should be adding to get this working?
Code sample
No response
Error message
No response
------------------------------------------------------
Beta Was this translation helpful? Give feedback.
All reactions