Skip to content

Commit

Permalink
Earlier julia expects trylock to be passed true
Browse files Browse the repository at this point in the history
  • Loading branch information
MilesCranmer committed Jan 8, 2024
1 parent 9dbe833 commit 0a7de84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PyCall.jl
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ const PYDECREF_LOCK = ReentrantLock()
function _pydecref_locked(po::PyObject)
# If available, we lock and decref
!islocked(PYDECREF_LOCK) &&
trylock(() -> pydecref_(po), PYDECREF_LOCK) &&
trylock(() -> (pydecref_(po); true), PYDECREF_LOCK) &&
return nothing

# Add back to queue to be decref'd later
Expand Down

0 comments on commit 0a7de84

Please sign in to comment.