Skip to content
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

onSessionExit(): Use finalizer on globalenv() instead of .Last hack #125

Open
HenrikBengtsson opened this issue Nov 7, 2020 · 1 comment

Comments

@HenrikBengtsson
Copy link
Owner

From futureverse/parallelly#31 (comment):

Does reg.finalizer(globalenv(), f, onexit = TRUE) behave differently from R.utils::onSessionExit()?

I never considered one could put a finalizer on the global environment; I thought that would removed much later in the shutdown process. This is much neater and should be more robust.

/ht @renkun-ken

@HenrikBengtsson HenrikBengtsson added this to the Next release milestone Nov 7, 2020
@HenrikBengtsson
Copy link
Owner Author

Should probably investigate which one of .Last() and reg.finalizer(globalenv(), f, onexit = TRUE) is processed first

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant