[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Idle func -> 100% CPU usage
- From: Gary Ross <gdr hooked net>
- To: gtk-app-devel-list redhat com
- Subject: Re: Idle func -> 100% CPU usage
- Date: Mon, 28 Jun 1999 10:18:04 -0700 (PDT)
Just curious about why you need the Tcl event loop running. If
you are using Tcl as the command language for your program all
you need to do is call Tcl_Evaluate from your signal handlers
whenever you want to run a Tcl command.
For example if you have an entry widget that you can type Tcl
commands in, just call Tcl_Evaluate from the activate signal
handler for the entry widget.
-g-
On Mon, 28 Jun 1999, Gert wrote:
> Hi,
>
> I use have a Tcl interpreter running in a gtk application, and because I want
> the Tcl event loop running, I connect a function with gtk_idle_add, that runs
> Tcl_ServiceAll(); and then returns TRUE;
> This, however, results in a 100% CPU usage for my program :(
>
> Is there a way to decrease this?
>
> I thought about a gtk_idle_add with a short idle time (50 ms or so), but I
> don't know if this will disrupt gtk's behaviour (that has the priority)...
>
> Any thoughts about this?
>
> Gert
> --
> _______________________________________________________________________________
> ~ Gert, Gs2, The Blue Mage - whatever you prefer
> 'v' E-Mail : Gs2@dds.nl
> // \\ Computer : nowmoo.demon.nl
> /( )\ Project : gMOO, a MOO (and MUD) client for the unises
> ^`~'^ HomePage : http://www.nowmoo.demon.nl
>
>
> --
> To unsubscribe: mail gtk-app-devel-list-request@redhat.com with
> "unsubscribe" as the Subject.
>
> Mailing list concerns should be mailed to <listmaster@redhat.com>
>
>
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]