Skip to content

Commit 4d6dbd1

Browse files
authored
Silence EOFError in pool_cleanup (#1502)
1 parent 494a01c commit 4d6dbd1

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "CUDA"
22
uuid = "052768ef-5323-5732-b1bb-66c8b64840ba"
3-
version = "3.9.1"
3+
version = "3.9.2"
44

55
[deps]
66
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"

src/pool.jl

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,16 @@ function pool_cleanup()
126126
end
127127
end
128128

129-
sleep(60)
129+
try
130+
sleep(60)
131+
catch ex
132+
if ex isa EOFError
133+
# If we get EOF here, it's because Julia is shutting down, so we should just exit the loop
134+
break
135+
else
136+
rethrow()
137+
end
138+
end
130139
end
131140
end
132141

0 commit comments

Comments
 (0)