PySide + multithreading

Jul 10, 2013 at 12:41 PM
I work with multithreading PySide application. The application has two threads: UI and working. Pytools debugger sees only the main UI thread and I can not debug working thread.

VS: 2010
PyTools 2.0 beta

PS: Thank you very much for your great work!
Coordinator
Jul 10, 2013 at 3:19 PM
Did you use the Python standard library to start that work thread, or some PySide API?
Jul 11, 2013 at 8:16 AM
I use QThread class from PySide ( wrapper for Qt threading )
Coordinator
Jul 12, 2013 at 2:56 AM
This is probably what causes the problem. The way we detect new Python threads is by monkey-patching the low-level _thread module and intercepting start_new_thread. So any mechanism that is built on top of that (e.g. the 'threading' module) is handled, but something that starts its own threads (and then just lets Python know about them post factum) is not. I'm pretty sure that QThread is in the latter bucket.

I'll need to explore other options of getting new thread notifications. There are some interpreter-specific means, but ideally we would want a portable solution to this problem. For the time being, can you try using the standard 'threading' module and see if that helps?