Commit aee0d162 authored by Victor Ananjevsky's avatar Victor Ananjevsky

use usleep instead of gtk_main_iteration in loops when waiting for input channel

parent 17bd9429
...@@ -170,7 +170,7 @@ handle_stdin (GIOChannel * channel, GIOCondition condition, gpointer data) ...@@ -170,7 +170,7 @@ handle_stdin (GIOChannel * channel, GIOCondition condition, gpointer data)
GString *string = g_string_new (NULL); GString *string = g_string_new (NULL);
while (channel->is_readable != TRUE) while (channel->is_readable != TRUE)
gtk_main_iteration (); usleep (100);
do do
{ {
......
...@@ -575,7 +575,7 @@ handle_stdin (GIOChannel *channel, GIOCondition condition, gpointer data) ...@@ -575,7 +575,7 @@ handle_stdin (GIOChannel *channel, GIOCondition condition, gpointer data)
gboolean node_added = FALSE; gboolean node_added = FALSE;
while (channel->is_readable != TRUE) while (channel->is_readable != TRUE)
gtk_main_iteration (); usleep (100);
do do
{ {
......
...@@ -267,7 +267,7 @@ handle_stdin (GIOChannel * channel, GIOCondition condition, gpointer data) ...@@ -267,7 +267,7 @@ handle_stdin (GIOChannel * channel, GIOCondition condition, gpointer data)
string = g_string_new (NULL); string = g_string_new (NULL);
while (channel->is_readable == FALSE) while (channel->is_readable == FALSE)
gtk_main_iteration (); usleep (100);
do do
{ {
......
...@@ -55,7 +55,7 @@ handle_stdin (GIOChannel *channel, GIOCondition condition, gpointer data) ...@@ -55,7 +55,7 @@ handle_stdin (GIOChannel *channel, GIOCondition condition, gpointer data)
string = g_string_new (NULL); string = g_string_new (NULL);
while (channel->is_readable != TRUE) while (channel->is_readable != TRUE)
gtk_main_iteration (); usleep (100);
do do
{ {
...@@ -69,7 +69,6 @@ handle_stdin (GIOChannel *channel, GIOCondition condition, gpointer data) ...@@ -69,7 +69,6 @@ handle_stdin (GIOChannel *channel, GIOCondition condition, gpointer data)
while (gtk_events_pending ()) while (gtk_events_pending ())
gtk_main_iteration (); gtk_main_iteration ();
} }
while (status == G_IO_STATUS_AGAIN); while (status == G_IO_STATUS_AGAIN);
......
...@@ -271,7 +271,7 @@ handle_stdin (GIOChannel * channel, GIOCondition condition, gpointer data) ...@@ -271,7 +271,7 @@ handle_stdin (GIOChannel * channel, GIOCondition condition, gpointer data)
string = g_string_new (NULL); string = g_string_new (NULL);
while (channel->is_readable != TRUE) while (channel->is_readable != TRUE)
gtk_main_iteration (); usleep (100);
do do
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment