0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

patch 8.0.0050

Problem:    An exiting job is detected with a large latency.
Solution:   Check for pending job more often. (Ozaki Kiichi)  Change the
            double loop in mch_inchar() into one.
This commit is contained in:
Bram Moolenaar
2016-10-27 20:00:07 +02:00
parent 2f97912800
commit 01688ad545
5 changed files with 156 additions and 119 deletions

View File

@@ -4643,8 +4643,8 @@ job_stop_on_exit(void)
}
/*
* Return TRUE when there is any job that might exit, which means
* job_check_ended() should be called once in a while.
* Return TRUE when there is any job that has an exit callback and might exit,
* which means job_check_ended() should be called more often.
*/
int
has_pending_job(void)
@@ -4652,7 +4652,11 @@ has_pending_job(void)
job_T *job;
for (job = first_job; job != NULL; job = job->jv_next)
if (job_still_alive(job))
/* Only should check if the channel has been closed, if the channel is
* open the job won't exit. */
if (job->jv_status == JOB_STARTED && job->jv_exit_cb != NULL
&& (job->jv_channel == NULL
|| !channel_still_useful(job->jv_channel)))
return TRUE;
return FALSE;
}