Skip to content

Commit 2e0e3d5

Browse files
report if task has started in show method (#50464)
1 parent d60f9b3 commit 2e0e3d5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

base/task.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,9 @@ function show_task_exception(io::IO, t::Task; indent = true)
104104
end
105105

106106
function show(io::IO, t::Task)
107-
print(io, "Task ($(t.state)) @0x$(string(convert(UInt, pointer_from_objref(t)), base = 16, pad = Sys.WORD_SIZE>>2))")
107+
state = t.state
108+
state_str = "$state" * ((state == :runnable && istaskstarted(t)) ? ", started" : "")
109+
print(io, "Task ($state_str) @0x$(string(convert(UInt, pointer_from_objref(t)), base = 16, pad = Sys.WORD_SIZE>>2))")
108110
end
109111

110112
"""

0 commit comments

Comments
 (0)