Skip to content

Commit

Permalink
use trylock in refresh_multi_line
Browse files Browse the repository at this point in the history
  • Loading branch information
rfourquet committed Sep 6, 2017
1 parent 081ed9e commit e42b591
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/repl/LineEdit.jl
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ refresh_multi_line(s::ModeState) = refresh_multi_line(terminal(s), s)
refresh_multi_line(termbuf::TerminalBuffer, s::ModeState) = refresh_multi_line(termbuf, terminal(s), s)
refresh_multi_line(termbuf::TerminalBuffer, term, s::ModeState) = (@assert term == terminal(s); refresh_multi_line(termbuf,s))
function refresh_multi_line(termbuf::TerminalBuffer, terminal::UnixTerminal, buf, state::InputAreaState, prompt = ""; indent = 0)
lock(REFRESH_LOCK)
while !trylock(REFRESH_LOCK) sleep(.01) end
_clear_input_area(termbuf, state)

cols = width(terminal)
Expand Down

0 comments on commit e42b591

Please sign in to comment.