-
-
Notifications
You must be signed in to change notification settings - Fork 505
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
p.wait() doesn't block #154
Comments
If it's a GUI application some applications tend to return to command line immediately and not block (some kind of daemonization). In this case, you should check from the application itself what it is doing and if there is a command-line flag to prevent this behavior. |
@miohtama With the --no-video (no_video=True) option it's not a GUI application, and even when it is it doesn't return from the command line until you close the video window. |
this is super old, but I'll attempt to answer it... the problem was concealed by: try:
print "MpvPlay thread: waiting"
self.p.wait()
except Exception, e:
pass a valid exception was being thrown, but it was ignored. that exception was it seems like you did this in order to use an exit callback when the spawned process finishes. good news is, exit callbacks have been added in the |
Take a look at this example:
As far as I can see, this should start the program "mpv" (you can substitute with "mplayer" is you don't have mpv installed), and after the program exits it should execute the exit_callback function. But the exit_callback function is executed immediately, while mpv is still running. Shouldn't self.p.wait() block in process_thread(), so exit_callback isn't called until mpv exits?
The text was updated successfully, but these errors were encountered: