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 Aug 24, 2017
1 parent f084da9 commit 232c03e
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 @@ -235,7 +235,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 232c03e

Please sign in to comment.