Yasuhiro Matsumoto wrote:
> Bram, you drop timeval but select() behave blocking forever if the 4th
> argument of select() is specified as NULL.
>
> diff --git a/src/os_win32.c b/src/os_win32.c
> index 9fa806e..ab1c239 100644
> --- a/src/os_win32.c
> +++ b/src/os_win32.c
> @@ -1461,6 +1461,10 @@ WaitForChar(long msec)
> */
> for (;;)
> {
> +#ifdef MESSAGE_QUEUE
> + parse_queued_messages();
> +#endif
> +
> #ifdef FEAT_MZSCHEME
> mzvim_check_threads();
> #endif
> @@ -1474,8 +1478,11 @@ WaitForChar(long msec)
> maxfd = channel_select_setup(-1, &rfds);
> if (maxfd >= 0)
> {
> - ret = select(maxfd + 1, &rfds, NULL, NULL, NULL);
> - if (ret > 0 && channel_select_check(ret, &rfds) > 0)
> + struct timeval tv;
> + tv.tv_sec = 0;
> + tv.tv_usec = 0;
> + ret = select(maxfd + 1, &rfds, NULL, NULL, &tv);
> + if (ret >= 0 && channel_select_check(ret, &rfds) > 0)
> return TRUE;
> }
Thanks. However, "ret >= 0" doesn't make sense, when "ret" is zero then
channel_select_check() doesn't do anything.
I'm also not sure about returing TRUE when the return value is > 0.
It would mean that a channel is no longer open.
Anyway, please try out the channels and check that they work.
Still more work to do...
--
>From "know your smileys":
:.-( Crying
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.