Added a test for finalization on shutdown by lostmsu · Pull Request #1206 · pythonnet/pythonnet · GitHub
Skip to content

Added a test for finalization on shutdown#1206

Merged
lostmsu merged 1 commit intopythonnet:masterfrom
losttech:bugs/FinalizationOnShutdown
Sep 20, 2020
Merged

Added a test for finalization on shutdown#1206
lostmsu merged 1 commit intopythonnet:masterfrom
losttech:bugs/FinalizationOnShutdown

Conversation

@lostmsu
Copy link
Copy Markdown
Member

@lostmsu lostmsu commented Aug 20, 2020

Potential issue reported here: 610d309#commitcomment-41601957

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Aug 21, 2020

lostmsu referenced this pull request Aug 21, 2020
This is an attempt to make finalizer much simpler.

Instead of using .NET async tasks, Py_AddPendingCall or other synchronization mechanism we simply move objects to be finalized into a ConcurrentQueue, which is periodically drained when a new PyObject is constructed.
@lostmsu lostmsu force-pushed the bugs/FinalizationOnShutdown branch from 73edfdc to 86a97fd Compare September 20, 2020 18:48
@lostmsu lostmsu changed the title [Draft] Added a test for finalization on shutdown Added a test for finalization on shutdown Sep 20, 2020
@lostmsu lostmsu merged commit ef2e6b4 into pythonnet:master Sep 20, 2020
@lostmsu lostmsu deleted the bugs/FinalizationOnShutdown branch September 20, 2020 19:58
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

Successfully merging this pull request may close these issues.

2 participants