Re: [gtk-list] How to do multi-threading ?
- From: Marc <marc upr41 univ-rennes1 fr>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] How to do multi-threading ?
- Date: Mon, 22 Jun 1998 11:32:33 +0200
Ionut Borcoman at debian wrote:
>
> Hi,
>
> I need something like this :
>
> 1. An aplication with a START and STOP button.
> 2. The START should set a variable to TRUE (running = TRUE) and call a
> function with an infinite loop like:
>
> void infiniteLoop()
> {
> while(running){
> /* do something */
> }
> }
>
> 3. The STOP should set the variable FALSE so that to force the
> infiniteLoop to finish.
>
Try this :
void infiniteLoop(void)
{
while( running ){
/* do something */
while ( gtk_events_pending() )
gtk_main_iteration();
}
}
Regards,
Marc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]