Re: [code] [textadept] Strange behaviour in spawn_proc:write(…)

From: Mitchell <m.att.foicica.com>
Date: Wed, 7 Oct 2015 09:44:58 -0400 (EDT)

Hi Giovanni,

On Tue, 6 Oct 2015, Giovanni Salmeri wrote:

>> Can you break up your input into 64K chunks and pass each
>> individually without the artificial waiting? That may be the better
>> practice.
>
> I have changed proc:write(text) with
>
> local chunk = 65536
> for i = 0, #text // chunk do
> proc:write(text:sub(1+chunk*i, chunk*(i+1)))
> end
>
> Now all seems to work perfectly, thank you!
> (I'm wondering if this manner of writing in the stdin shouldn't be the
> normal one under the hood, to avoid such problems.)

Yes, I'll fix the underlying proc:write() to write in 64K chunks.

Cheers,
Mitchell

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Wed 07 Oct 2015 - 09:44:58 EDT

This archive was generated by hypermail 2.2.0 : Thu 08 Oct 2015 - 06:46:54 EDT