-
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
Allow children to close parent connection #93
Comments
Just to be sure... In your example, you did not use a callback so
Is this on purpose ? The expected usage is
Mixing both in one step will indeed hide all the methods of the However, I see the advantage of adding a function that allow to close the opened process if this situation happens. I'll think of something... 🤔 |
Let's note also that the chrome process is supervised and there is a finalizer, so it should be closed when the object is garbage collected. library(crrri)
chrome <- Chrome$new(bin = pagedown::find_chrome(), debug_port = httpuv::randomPort())
rm(chrome)
gc(TRUE) Without creating the client <- Chrome$new(bin = pagedown::find_chrome(),
debug_port = httpuv::randomPort())$connect()
rm(client)
gc(TRUE) Currently the processx object is only in the Chrome R6 class because this is the one corresponding to the chrome browser execution. It is not passed through other class because it does not seem related for me. By not creating the chrome object your missing the methods made to control the opened browser. What is your real need here ? Is it just being able to close the opened process in case of error because you don't have the chrome object ? |
Let's say I have this piece of code:
Created on 2020-04-10 by the reprex package (v0.3.0)
AFAIK, here I'll never have access to the
close()
method from theChrome
generator.Would be nice to have access to the close method even if we never create the
chrome
object itself.The text was updated successfully, but these errors were encountered: