junegunn/vim-plug — pull request #103 by junegunn (2014-10-09 11:07:38+00:00)
Title: Parallel installer for Neovim

This pull request implements parallel installer using Neovim's job control.

(/cc @justinmk)

### Caveats

#### Asynchronous

Due to the nature (or limitation?) of job control, this version of parallel installer is asynchronous. (Polling doesn't work since it blocks main thread.) You can freely move your cursor, edit other buffers while installation is ongoing. Which is cool and all but it's inconsistent with the current behavior, and it's not anymore possible to write something like the following:

```sh
# The installer is asynchronous, so this will exit immediately
nvim +PlugUpdate +qa
```

Being asynchronous also means that the user can close the plug window or switch tabs anytime during the installation. If the window is closed, we have to make sure that the running jobs are correctly terminated. Currently I'm calling `jobstop()` function to abort tasks, but I've noticed that the git processes are not immediately killed.

So we definitely need more tests but unfortunately I don't think it's possible to write test cases for asynchronicity using Vader.vim.

#### Unable to detect errors

As far as I know, current API of job control does not expose the exit status of the process.

#### Windows support

I don't think `jobstart(name, 'sh', ['-c', args])` would run on Windows. :unamused:
Does Neovim support Windows?