Skip to content

Commit 1c84a69

Browse files
committed
Simplify workload_enabled
1 parent a994463 commit 1c84a69

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

src/workloads.jl

+3-10
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11

22
function workload_enabled(mod::Module)
3-
try
4-
if load_preference(@__MODULE__, "precompile_workloads", true)
5-
return load_preference(mod, "precompile_workload", true)
6-
else
7-
return false
8-
end
9-
catch
10-
true
11-
end
3+
load_preference(@__MODULE__, "precompile_workloads", true) && load_preference(mod, "precompile_workload", true)
124
end
135

146
"""
@@ -81,7 +73,8 @@ macro compile_workload(ex::Expr)
8173
else
8274
# Use the hack on earlier Julia versions that blocks the interpreter
8375
ex = quote
84-
while false end
76+
while false
77+
end
8578
$(esc(ex))
8679
end
8780
end

0 commit comments

Comments
 (0)