Re: Infinite loop within a callback
- From: G Hasse <gh raditex se>
- To: Angelo Carpenzano <acarpenzano tiscalinet it>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Infinite loop within a callback
- Date: Mon, 30 Apr 2001 11:50:04 +0200 (CEST)
On Mon, 30 Apr 2001, Angelo Carpenzano wrote:
Hi, I need to start an infinite loop when a toggle button receive the
"toggled" event and I must to stop this loop when the is re-toggled.
If I write:
while(TRUE) {
...
}
I can't listen event and I can't stop the loop.
In addition to using threads, what a solution can I use?
You should listen to a file descriptor with
gdk_input_add( fd, GDK_INPUT_READ, GTK_SIGNAL_FUNC(file_function),
&cmdinfo );
Note that a file dscriptor could be a socket!
GH
Thanx,
Angelo Carpenzano
§
Personal site: http://web.tiscalinet.it/acarpenzano/
Favourite site: http://www.softwareplanet.net/
e-mail address: acarpenzano tiscalinet it
§
Sorry for my bad english ;-)
----------------------------------------------------------------
Göran Hasse email: gh raditex se Tel: +46 8 694 92 70
Raditex AB http://www.raditex.se Fax: +46 8 442 05 91
Sickla Alle 7, 1tr Mob: 070-5530148
131 34 NACKA, SWEDEN
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]