0
0
mirror of https://github.com/vim/vim.git synced 2025-10-01 04:54:07 -04:00

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.
This commit is contained in:
Bram Moolenaar
2016-11-24 17:22:50 +01:00
parent 2cab0e1910
commit 833eb1d752
6 changed files with 88 additions and 48 deletions

View File

@@ -2503,4 +2503,20 @@ typedef enum
# define OPEN_CHR_FILES
#endif
#if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)
# define ELAPSED_TIMEVAL
# define ELAPSED_INIT(v) gettimeofday(&v, NULL)
# define ELAPSED_FUNC(v) elapsed(&v)
# define ELAPSED_TYPE struct timeval
long elapsed(struct timeval *start_tv);
#else
# if defined(WIN32)
# define ELAPSED_TICKCOUNT
# define ELAPSED_INIT(v) v = GetTickCount
# define ELAPSED_FUNC(v) elapsed(v)
# define ELAPSED_TYPE DWORD
long elapsed(DWORD start_tick);
# endif
#endif
#endif /* VIM__H */