-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
Using multiprocessing package #119
Comments
Try running this before you invoke any multiprocessing code:
No need to call |
Thank you, this method works! |
When using the Python multiprocessing method in the plugin, it freezes with no response. Using this method only hides the popped-up window, but the code still does not execute correctly |
Please try this test code. The function should return the input string after 3 seconds.
|
I can't replicate this, what version and distribution of python and packages are you using? Do you have any security software running? Are you loading anything else other than the above test code? |
Python 3.12.6 (tags/v3.12.6:a4a2d2b, Sep 6 2024, 20:11:23) [MSC v.1940 64 bit (AMD64)] on win32,No security software,xloil 0.19.1 |
I'm also using that python version. Are you using a python distribution or vanilla python? Are you loading any other modules other than the above code? Are any other addins loaded in Excel? Which version of Excel? Windows defender runs by default in current windows versions, so when you say you have no security software, are you disabling this? Does any xloil log information appear (when logging is set to debug) other than the message above? If you do not set the executable to "pythonw.exe", does the test code run (with a popup)? |
I want to define a command to execute a multiprocessing function, but the result is not executable, and the command line window keeps popping up. In Python on Windows, you need to add
if __name__ == "__main__": import multiprocessing multiprocessing.freeze_support()
to prevent the process creation code from being executed indefinitely. However, I don't know how to add it in the plugin code, or if there are other solutions?The text was updated successfully, but these errors were encountered: