comparison src/channel.c @ 28347:d6892ed619e0 v8.2.4699

patch 8.2.4699: hard to reproduce hang when reading from a channel Commit: https://github.com/vim/vim/commit/75a0f3c011dfbafd2d60e87d4b2b07572df3e3ec Author: LemonBoy <thatlemon@gmail.com> Date: Tue Apr 5 22:03:30 2022 +0100 patch 8.2.4699: hard to reproduce hang when reading from a channel Problem: Hard to reproduce hang when reading from a channel. Solution: Check for readahead before starting to wait. (closes https://github.com/vim/vim/issues/10093, closes #7781, closes #6364)
author Bram Moolenaar <Bram@vim.org>
date Tue, 05 Apr 2022 23:15:02 +0200
parents d32dc906dd2c
children 0533e7466ef0
comparison
equal deleted inserted replaced
28346:e080546fb0f8 28347:d6892ed619e0
3995 // Handle any other messages in the queue. If done some more 3995 // Handle any other messages in the queue. If done some more
3996 // messages may have arrived. 3996 // messages may have arrived.
3997 if (channel_parse_messages()) 3997 if (channel_parse_messages())
3998 continue; 3998 continue;
3999 3999
4000 // channel_parse_messages() may fill the queue with new data to
4001 // process.
4002 if (channel_has_readahead(channel, part))
4003 continue;
4004
4000 // Wait for up to the timeout. If there was an incomplete message 4005 // Wait for up to the timeout. If there was an incomplete message
4001 // use the deadline for that. 4006 // use the deadline for that.
4002 timeout = timeout_arg; 4007 timeout = timeout_arg;
4003 if (chanpart->ch_wait_len > 0) 4008 if (chanpart->ch_wait_len > 0)
4004 { 4009 {