Bug 627071 – g_output_stream_write() clarification
authorDavid Zeuthen <davidz@redhat.com>
Mon, 16 Aug 2010 19:37:01 +0000 (15:37 -0400)
committerDavid Zeuthen <davidz@redhat.com>
Mon, 16 Aug 2010 19:38:02 +0000 (15:38 -0400)
commitb8e7ef6e90512999be0340a6ef3f20e1783647c4
tree24a9156dc699642c9307433970fa2624fcfb45b6
parent285170637de0df2011b9b667cab5c68640832580
Bug 627071 – g_output_stream_write() clarification

This patch guarantees that g_output_stream_write() can never fail with
G_IO_ERROR_WOULD_BLOCK. Without such a guarantee, we would need some
kind of GIOPollable interface or some way to get an event when the
stream is writable again. Which is mostly useless considering that
this method is asynchronous anyway.

Note: this patch just codifies existing behavior - GUnixOutputStream,
GSocketOutputStream and other implementations already work this way.

See also bug 626748 comment 5 for how the GDBus code relies on this
guarantee.

https://bugzilla.gnome.org/show_bug.cgi?id=627071

Signed-off-by: David Zeuthen <davidz@redhat.com>
gio/goutputstream.c