prabirshrestha/async.vim

Question: Is the race condition at vim 8 OK? / Suggestion: fix method

Opened this issue · 2 comments

Question:

I made a proposal for function summarization at asyncomplete-tags.vim. [asyncomplete-tags.vim issues # 9] (prabirshrestha/asyncomplete-tags.vim#9)

But I thought that the proposal would be difficult with async.vim's close / exit property of vim 8, and I closed it once.

It seems async.vim does not follow-up with this specification.
Or mode=raw was not affect?

see below

elseif l:jobtype == s:job_type_vimjob
let s:jobidseq = s:jobidseq + 1
let l:jobid = s:jobidseq
let l:job = job_start(a:cmd, {
\ 'out_cb': function('s:out_cb', [l:jobid, a:opts]),
\ 'err_cb': function('s:err_cb', [l:jobid, a:opts]),
\ 'exit_cb': function('s:exit_cb', [l:jobid, a:opts]),
\ 'mode': 'raw',
\})

and

https://github.com/prabirshrestha/asyncomplete-tags.vim/blob/c3c575a62a34661134e9e9427fdcc46dc50a5069/autoload/asyncomplete/sources/tags.vim#L158-L186

reference : other job-wrapper implementation.

https://github.com/lambdalisue/vital-Whisky/blob/master/autoload/vital/__vital__/System/Job/Vim.vim#L43-L64

and document

https://github.com/lambdalisue/vital-Whisky/blob/master/doc/Vital/System/Job.txt#L111-L114


Suggestion:

If require workaround in async.vim, what kind of countermeasures do you consider and do?

  1. no care, because not affect.
  2. like asyncomplete-tags.vim workaround : both status checking
  3. like vital-Whisky System.Job(vim8) workaround : exit wait channel is done

I would like to have a fix in async.vim. That would fix allow us to fix other plugins that depends on it. I’m ok with any but would be good if we could make the behavior the same in both vim8 and neovim.

Omm...

As an opinion because it can not be said that it is too detailed.

I think that it is better to fix async.vim for how to fix it.

It is still not effective to respond individually, and there is also a problem that it can not be dealt with when there are people or products that are being used elsewhere.

NeoVim seems to be dealing with the problem on the body about close, and there seems to be no way to utilize close as a result, so I think that there is no problem even if I fix it.

note
https://neovim.io/doc/user/eval.html#jobstart()