Skip to content
This repository has been archived by the owner on Mar 12, 2021. It is now read-only.

Protect against recursive failures during init. #710

Merged
merged 1 commit into from
May 8, 2020
Merged
Changes from all commits
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
3 changes: 1 addition & 2 deletions src/CuArrays.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ const configure_lock = ReentrantLock()
@noinline function _functional(show_reason::Bool=false)
lock(configure_lock) do
if configured[] === nothing
configured[] = false
if __configure__(show_reason)
configured[] = true
try
Expand All @@ -50,8 +51,6 @@ const configure_lock = ReentrantLock()
configured[] = false
rethrow()
end
else
configured[] = false
end
end
end
Expand Down