We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8d55889 commit fe7ef9eCopy full SHA for fe7ef9e
src/utility.jl
@@ -8,6 +8,9 @@ problem (in such cases it is best to multithread only at the outermost level).
8
"""
9
function disable_polyester_threads(f::F) where {F}
10
t, r = request_threads(num_threads())
11
- f()
12
- foreach(free_threads!, r)
+ try
+ f()
13
+ finally
14
+ foreach(free_threads!, r)
15
+ end
16
end
0 commit comments