Fix deadlock when subprocess ended#104
Conversation
|
Oh, not sure if it's relevant, my Allzpark was launched from a Rez resolved environment. (Maybe the problem was not related to the OS ?) |
|
Update |
|
Hmmmm. I'm a bit suspicious about the simplicity of the solution. Would prefer if you used this for a while, make sure there aren't any unforeseen issues with it. I remember having a similar problem/solution with Pyblish. For example, this wouldn't allow applications to emit newlines? And if an application is emitting empty lines and our loop responds with |
I remember I've tested this kind of case, and just tested it again for making sure, looks like no problem :D And in this test, the maya is printing
But yes, I would prefer that as well. As you can see in the above gif, currently I am still working with mock apps. :) |
|
Re mock apps: Ah yes. You're in for a treat once you find that Maya, Nuke, Houdini and just about any DCC have their own way of treating the terminal and STDOUT. Some use |
It actually did enter the infinite loop, but doesn't drag the resource much so I thought the problem was resolved (what was I thinking). Howerver the Allzpark's "Commands" page did say the process is still running and I possibly didn't notice that as well at the time being.. 🤕 |


Problem
After I closed the application that was launched from Allzpark, Allzpark freezed.
I found that it was because the
self.stdout.emit(line.rstrip())keep emitting empty lines.Changed
Continue the loop if line is empty resolved the problem.
Also, I added bytes decode when running in Python 3, and fixed a typo on the way.