Skip to content

Commit cfc7ed2

Browse files
committed
wait(): just typeassert instead of asserting isa
A typeassert seems like better style. Given that `typeassert` is a builtin, why not put it to use. See: * JuliaLang#57544 (comment)
1 parent 345c6ec commit cfc7ed2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

base/task.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1220,7 +1220,7 @@ function wait()
12201220
# We may have already switched tasks (via the scheduler task), so
12211221
# only switch if we haven't.
12221222
if !have_result
1223-
@assert task isa Task
1223+
task = task::Task
12241224
set_next_task(task)
12251225
result = try_yieldto(ensure_rescheduled)
12261226
end

0 commit comments

Comments
 (0)