[Github-comments] [geany/geany] Handle continuous G_IO_IN-s without any data (#1461)
Colomban Wendling
notifications at xxxxx
Wed Dec 6 04:50:38 UTC 2017
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++;
@zhekov shouldn't this be reset to 0 on successful read attempts (or decremented, I don't know) to avoid the occasional one to trigger the switch after a long while? Assuming it's not the occasional faulty one that trigger the big issue.
I'm not sure I totally get the implications of the issue, but it seems sad to switch to timeout if the faulty callbacks happens from time to time only -- let's say it happens every minute, it would switch to timeout source after 3h20 nonetheless.
--
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#pullrequestreview-81415727
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20171205/5a3da3ad/attachment.html>
More information about the Github-comments
mailing list