Re: callbacks: doing i/o bound stuff in them
- From: Peter <hpklett hotmail com>
- To: Vassilis Pandis <pandisv yahoo co uk>, gtk-app-devel-list gnome org
- Cc:
- Subject: Re: callbacks: doing i/o bound stuff in them
- Date: Tue, 14 Mar 2006 11:19:35 -0700
Vassilis Pandis wrote:
--- Peter <hpklett hotmail com> wrote:
Both gtk functions you called emit signals. Signals are processed in
the main loop. sleep keeps you in the current handler, and the main
loop doesn't get any say in the matter until on_druid_pf_finish
returns. I'm not sure I understand why sleep is actually there, but
checkout using timeouts instead.
I put the sleep() call to simulate my "networking function" which I haven't written yet. So
basically the actual destroying of the widget happens in main() and not when calling the gtk_blah
functions? Makes sense now....So should I do the networking part with threads or should I put a
gkt_idle_add() ?
As Santosh wrote, threads is probably a better idea.
___________________________________________________________
To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre.
http://uk.security.yahoo.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]