Open eyalk5 opened 5 years ago
Interesting.
Did a quick test here in vimscript
function! Wat()
while 1 == 1
let x=getchar(1)
"if !type(nr) && nr == 0:
" continue
"HANDLE input
endwhile
endfunction
I do see a spike in cpu consumption (in nvim) but no thread variation in either nvim or nvim-qt. The UI blocks with the cursor on the corner and no rendering happens even with a resize.
Using getchar()
avoids the cpu comsumption but still blocks rendering (not surprising).
I thought this was supposed to work (https://github.com/neovim/neovim/pull/5384) but maybe I was wrong.
PS: funny bit - this also happens with vim-gtk.
Hi,
as witnessed in LeaderF, when doing
neovim-qt (with latest neovim server on macos) hangs (from time to time). Especially, it hangs when many keys are sent at once.
That is, it stops handling keys until one cause it to redraw (for example, change the size). This behavior is present in last version of LeaderF . The solution is sleep. It seems to be a thread starvation issue.