[Github-comments] [geany/geany] Handle continuous G_IO_IN-s without any data (#1461)

Colomban Wendling notifications at xxxxx
Wed Feb 14 21:07:30 UTC 2018


b4n commented on this pull request.



> @@ -871,13 +893,24 @@ static gboolean spawn_write_cb(GIOChannel *channel, GIOCondition condition, gpoi
 }
 
 
+static gboolean spawn_read_cb(GIOChannel *channel, GIOCondition condition, gpointer data);
+
+static gboolean spawn_timeout_read_cb(gpointer data)
+{
+	SpawnChannelData *sc = (SpawnChannelData *) data;
+
+	/* The solution for continuous empty G_IO_IN-s is to generate them outselves. :) */
+	return spawn_read_cb(sc->channel, G_IO_IN, data);

> It would have been sooo much easier if glib had source suspend/resume...

can't one simply ref the source, remove it from the context, add it back and unref it as a mean to pause it?

-- 
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_r168309852
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20180214/78bc377b/attachment.html>


More information about the Github-comments mailing list