On 14 October 2016, Bram Moolenaar <b...@moolenaar.net> wrote:
> Ozaki Kiichi wrote:
> > Currently, vim checks ended-job every 10 second; thus exit_cb is delayed
> > 10 seconds at the maximum.
> > I propose the following:
> > https://gist.github.com/ichizok/fe9743f46822a9015ed2f7d65238c5db
> > os_unix: check by waitpid(-1, _, WNOHANG).
> > os_win32: check by WaitForMultipleObjects(),
> > "the number of active jobs" / MAXIMUM_WAIT_OBJECTS (==64) times.
> > They suppress the count of calling syscall to be nearly constant regardless
> > of the number of active jobs.
> > # I set MAX_ENDED_JOB_COUNT (the maximum number of detections
> > # in job_check_ended()) to 8, but this may require consideration.
> Looks useful.
> The JOB_WAITED value does not have a clear meaning. It looks like we
> know the job has ended, but has not been cleaned up yet. Perhaps call
> it JOB_EXITED ?
On a side note: a Vim function job_wait() that would do a blocking
wait for a given job would be useful, too.
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
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/d/optout.