One of the big mistakes I did in designing async.vim was to default to neovim output. Most of the time you need to get string and his can be costly for vim, since vim by default returns a string, which means we call split in async.vim then the consumer calls join which should had ideally been a noop. This allocates unnecessary memory due to string and array creation. Luckily we can have 100% backwards compatibility as I still default to 'array' if not passed and one can easily override it to 'string'. For callbag.vim's spawn function I had defaulted to 'raw' and make the user decide if they want compatibility.
An additional optional parameter was added to `async#job#send` that user
can use (i.e. passing in a truthy value) to close stdin right after data
transfer.
Whe job_stop() is called,
Previous behavior:
Vim:
The target job is removed from s:jobs in 'exit_cb' IMMEDIATELY
after job_stop() has called.
Neovim:
The target job is removed from s:jobs in 'job_stop()' because
'on_exit' callback is not IMMEDIATELY called after jobstop().
That's why the target job is missing when 'on_exit' callback
has called.
Fixed behavior:
Vim:
The target job is removed from s:jobs in 'exit_cb' IMMEDIATELY
after job_stop() has called.
Neovim:
The target job is removed from s:jobs in 'on_exit' after
jobstop() has called.
The target job still exists when 'on_exit' callback is called.
This library is distributed with MIT license. It requires to show the
copyright notice in software. So when embedding this library in a plugin,
a user also needs to show the copyright in the plugin.
By embedding a license description and copyright notice to source file,
a user doesn't need to take care about license notice because it is
already put in the source file.