Skip to content

Commit 4ebdbff

Browse files
close task before returning from prompt!
1 parent 0a7c5a9 commit 4ebdbff

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

stdlib/REPL/src/LineEdit.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2827,6 +2827,7 @@ function prompt!(term::TextTerminal, prompt::ModalInterface, s::MIState = init_s
28272827
Base.reseteof(term)
28282828
raw!(term, true)
28292829
enable_bracketed_paste(term)
2830+
t = nothing
28302831
try
28312832
activate(prompt, s, term, term)
28322833
old_state = mode(s)
@@ -2876,6 +2877,10 @@ function prompt!(term::TextTerminal, prompt::ModalInterface, s::MIState = init_s
28762877
end
28772878
end
28782879
finally
2880+
if t !== nothing
2881+
put!(s.async_channel, Returns(:done))
2882+
wait(t)
2883+
end
28792884
raw!(term, false) && disable_bracketed_paste(term)
28802885
end
28812886
# unreachable

0 commit comments

Comments
 (0)