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

From: Giovanni Salmeri <g.salmeri.att.mondodomani.org>
Date: Tue, 6 Oct 2015 22:08:52 +0200

> 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.)

-- 
Giovanni Salmeri
http://mondodomani.org/pers/salmeri/
-- 
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 Tue 06 Oct 2015 - 16:08:52 EDT

This archive was generated by hypermail 2.2.0 : Wed 07 Oct 2015 - 06:46:01 EDT