| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
@filmor looks like I got tests to pass, so this is ready. |
Sorry, something went wrong.
| ResetPyMembers(); | ||
| if (mode != ShutdownMode.Extension) | ||
| { | ||
| Py_Finalize(); |
There was a problem hiding this comment.
This is my only real gripe with this: Embedders would not be able to finalise the Python runtime at all anymore. Maybe we should provide this (Shutdown() + Py_Finalize()) as a possible footgun with a long name?
Sorry, something went wrong.
There was a problem hiding this comment.
We can always add it if there is a strong request. Instead what happened is people opening bugs about crashes after restarting runtime because NumPy does not support it. I'd rather avoid it.
Moreover, the behavior of the whole thing when either of runtimes is shut down completely is pretty much undefined.
Sorry, something went wrong.
… is an equivalent of `ShutdownMode.Reload` also in this change: - fixed Python derived types not being decrefed when an instance is deallocated - reduced time and amount of storage needed for runtime reload - removed circular reference loop between Type <-> ConstructorBinding(s) + exposed Runtime.TryCollectingGarbage
clearing GCHandle from an instance of Python derived type would drop the last reference to it, so it was destroyed without being removed from reflectedObjects collection
|
@filmor I am waiting for an explicit approval or more comments |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
What does this implement/fix? Explain your changes.
This removes all shutdown modes, except Reload (which you don't need to specify, because it is the only one left).
This means Python C runtime is never actually shut down when .NET calls PythonEngine.Shutdown(). Instead, anything from .NET exposed to Python before Shutdown becomes unavailable until PythonEngine.Initialize() is called again (which can be done from a different AppDomain).
Any other comments?
Also in this change:
A review from @amos402 would be welcome