I’m trying to spawn threads in Python/Komodo. It works standalone but in Komodo it does not appear that the treads get active. (I also can’t figure out how to get indents to work properly on this forum post so ignore the obvious indent problems). I don’t see any print output when I run this in Komodo but outside of Komodo I do. I’ve tried another version where I’m writing to a database and nothing is being written and no exceptions are thrown (when in Komodo). What am I missing?
Be sure to read up about the Python GIL before you really delve into threads though, as it significantly limits what you can and cannot do with Python threads.
The code I included is not my real code. I included that just for illustration.
My threads are now working. The problem I am having is specific to Komodo: If I include print statements or breakpoints in the worker thread (as opposed to the main thread), I do not see output (print) and the breakpoint is not tripped. So what I am trying to figure out is how to get Komodo IDE to give me visibility and control over a thread that is not the main thread.