Hi Bram,

2016/11/25 Fri 1:23:12 UTC+9 Bram Moolenaar wrote:
> Patch 8.0.0097
> Problem:    When a channel callback consumes a lot of time Vim becomes
>             unresponsive. (skywind)
> Solution:   Bail out of checking channel readahead after 100 msec.
> Files:      src/os_unix.c, src/misc2.c, src/vim.h, src/os_win32.c

> +     long
> + elapsed(DWORD start_tick)
> + {
> +     DWORD   now = GetTickCount();
> + 
> +     if (now < start_tick)
> +     /* overflow */
> +     return (long)now;
> +     return (long)now - (long)start_tick;
> + }

I don't think overflow checking is needed here.

    return (long)now - (long)start_tick;

should work on Windows even if overflow occurs.

Regards,
Ken Takata

-- 
-- 
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 vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui