> ch_sendraw seems to fail when sending large chunks of data to a job 
> started in non-blocking mode.  Is this expected?
> 
> Steps to reproduce:
> 
> - Copy the following into a file, and source it from vim
> 
> let args = ['cat']
> let opts = {
>         \ 'noblock': 1
>         \}
> 
> let job = job_start(args, opts)
> let data = repeat('X', 65537)
> 
> call ch_sendraw(job, data)
> call ch_close_in(job)
> 
> Expected behavior:
> 
> - Nothing much (i.e. no errors)
> 
> Actual bevarior:
> 
> - E630: channel_write_input(): write while not connected
> 
> If on the other hand, I initialized data with 65536 bytes instead of 
> 65537, then no error would be thrown.

You are using "noblock", which means the write may happen a bit later,
but then you use ch_close_in(), closing the channel before all the
writes are done.  If you put a sleep there it works.

-- 
>From "know your smileys":
 :.-(   Crying

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
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 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/201908221357.x7MDvReJ001320%40masaka.moolenaar.net.

Raspunde prin e-mail lui