gio: use GPollable* to implement fallback read_async/write_async
authorDan Winship <danw@gnome.org>
Sat, 4 Feb 2012 21:46:29 +0000 (16:46 -0500)
committerDan Winship <danw@gnome.org>
Tue, 17 Apr 2012 16:33:12 +0000 (12:33 -0400)
commit00ee06e6a332d1415baf5533e34f05a83d64cb02
treeec7a5ce9dbdf2bfd69a105ca42d1521599e29d32
parent82ec4dcaed8107d436f76c45ec30645715b6dbef
gio: use GPollable* to implement fallback read_async/write_async

If a GInputStream does not provide a read_async() implementation, but
does implement GPollableInputStream, then instead of doing
read-synchronously-in-a-thread, just use
g_pollable_input_stream_read_nonblocking() and
g_pollable_input_stream_create_source() to implement an async read in
the same thread. Similarly for GOutputStream.

Remove a bunch of existing read_async()/write_async() implementations
that are basically equivalent to the new fallback method.

https://bugzilla.gnome.org/show_bug.cgi?id=673997
gio/gbufferedinputstream.c
gio/gbufferedoutputstream.c
gio/ginputstream.c
gio/gmemoryinputstream.c
gio/gmemoryoutputstream.c
gio/goutputstream.c
gio/gsocketinputstream.c
gio/gsocketoutputstream.c
gio/gunixinputstream.c
gio/gunixoutputstream.c