[Github-comments] [geany/geany] Handle continuous G_IO_IN-s without any data (#1461)
Colomban Wendling
notifications at xxxxx
Wed Feb 14 20:24:58 UTC 2018
b4n commented on this pull request.
> @@ -967,6 +1002,25 @@ static gboolean spawn_read_cb(GIOChannel *channel, GIOCondition condition, gpoin
sc->cb.read(buffer, input_cond | failure_cond, sc->cb_data);
}
+ /* Check for continuous activations with G_IO_IN | G_IO_PRI, without any
+ data to read and without errors. If detected, switch to timeout source. */
+ else if (SPAWN_CHANNEL_GIO_WATCH(sc) && status == G_IO_STATUS_AGAIN)
+ {
+ sc->empty_gio_ins++;
BTW, does the condition include `G_IO_IN | G_IO_PRI` at all? Here you use `! (G_IO_ERR | G_IO_HUP | G_IO_NVAL)`, which seems reasonable at first, but if it's a bug in GLib maybe the condition is just empty or even `G_IO_OUT`?
Anyway, that doesn't change much, just curiosity on my part.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1461#discussion_r168299680
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20180214/6c2619b5/attachment.html>
More information about the Github-comments
mailing list