Re: [Spice-devel] [PATCH spice-gtk] controller: async flush read/write

2012-07-03 Thread Marc-André Lureau
Hi - Mensaje original - > On 07/03/2012 04:41 AM, Marc-André Lureau wrote: > > + while (i< length) { > > + var n = yield stream.write_async (buffer[i:length]); > > Does stream.write_async throws exceptions on errors ? > If not, then this code needs to handle e

Re: [Spice-devel] [PATCH spice-gtk] controller: async flush read/write

2012-07-03 Thread Uri Lublin
On 07/03/2012 04:41 AM, Marc-André Lureau wrote: Windows namedpipes behave a bit differently from Unix socket, and may return incomplete read/write. By using 2 read/write() helpers, try to complete the operation before returning. Since the IO operation may be splitted over several call, we make s

Re: [Spice-devel] [PATCH spice-gtk] controller: async flush read/write

2012-07-03 Thread Alon Levy
On Tue, Jul 03, 2012 at 03:41:21AM +0200, Marc-André Lureau wrote: > Windows namedpipes behave a bit differently from Unix socket, and may > return incomplete read/write. By using 2 read/write() helpers, try to > complete the operation before returning. Since the IO operation may be > splitted over

[Spice-devel] [PATCH spice-gtk] controller: async flush read/write

2012-07-02 Thread Marc-André Lureau
Windows namedpipes behave a bit differently from Unix socket, and may return incomplete read/write. By using 2 read/write() helpers, try to complete the operation before returning. Since the IO operation may be splitted over several call, we make sure the buffer pointer is on the heap. We use excep