Skip to content

Commit

Permalink
Silence EOFError in pool_cleanup (#1502)
Browse files Browse the repository at this point in the history
  • Loading branch information
Octogonapus authored May 12, 2022
1 parent 494a01c commit 4d6dbd1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "CUDA"
uuid = "052768ef-5323-5732-b1bb-66c8b64840ba"
version = "3.9.1"
version = "3.9.2"

[deps]
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"
Expand Down
11 changes: 10 additions & 1 deletion src/pool.jl
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,16 @@ function pool_cleanup()
end
end

sleep(60)
try
sleep(60)
catch ex
if ex isa EOFError
# If we get EOF here, it's because Julia is shutting down, so we should just exit the loop
break
else
rethrow()
end
end
end
end

Expand Down

0 comments on commit 4d6dbd1

Please sign in to comment.