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

Make GC more thread-safe #883

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix return
marius311 committed Feb 26, 2021

Verified

This commit was signed with the committer’s verified signature.
tornqvist Carl Törnqvist
commit c707032283148216ef90b6b82090025f127d1f38
4 changes: 2 additions & 2 deletions src/PyCall.jl
Original file line number Diff line number Diff line change
@@ -85,11 +85,11 @@ end
# queue to try again later when we'll eventually be on the main thread.
function _pydecref_eventually(po)
if Threads.threadid()==1
return pydecref(po)
pydecref(po)
else
finalizer(_pydecref_eventually, po)
return nothing
end
return nothing
end

PyPtr(o::PyObject) = getfield(o, :o)