GTK - Proper Way to Code Pipes
- From: "Christopher Bland" <themanatuf juno com>
- To: gtk-app-devel-list gnome org
- Subject: GTK - Proper Way to Code Pipes
- Date: Tue, 5 Dec 2006 21:35:43 GMT
Based on suggestions from this mailing list I've implemented a pipe to
pass data from my other processes to the main GTK thread. I noticed
that when writing to the pipe there was a long delay before it was
handled. I'm assuming this is because it was a pending event.
Can someone please let me know if my code to "fix" this (for lack of a
better word) is correct? The code solves my issue and the pipe is read
immediately, I'm not sure if it is the proper way to do it.
[code]
... main processing ...
written = write(status_pipe[1], &var, strlen(var));
gtk_main_iteration();
... continue processing ...
[/code]
Is there a better way to do this? Thanks for any input.
________________________________________________________________________
Try Juno Platinum for Free! Then, only $9.95/month!
Unlimited Internet Access with 1GB of Email Storage.
Visit http://www.juno.com/value to sign up today!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]