nanogui: link app into server


Previous by date: 15 May 2006 15:16:50 +0100 Re: nxFlushReq, Robbie
Next by date: 15 May 2006 15:16:50 +0100 Re: Cross compiling Fltk/flnx, Aveek Adhya
Previous in thread: 15 May 2006 15:16:50 +0100 Re: LINK APP INTO SERVER, Greg Haerr
Next in thread: 15 May 2006 15:16:50 +0100 Re: LINK APP INTO SERVER, Greg Haerr

Subject: Re: [nanogui] LINK APP INTO SERVER
From: "Robbie" ####@####.####
Date: 15 May 2006 15:16:50 +0100
Message-Id: <20060515141651.346148B316@xprdmxin.myway.com>

 --- On Sun 05/14, Greg Haerr < ####@####.#### > wrote:
From: Greg Haerr [mailto: ####@####.####
To: ####@####.#### ####@####.####
Date: Sun, 14 May 2006 18:50:36 -0600
Subject: Re: [nanogui] LINK APP INTO SERVER


>: A while back I remember someone telling me not to use GrCheckNextEvent but
use GrGetNextEvent in my event loop.
>: It turns out that GrGetNextEvent will block for a considerible period of
time and that appears to be where the problem is.
>: I've changed back to GrCheckNextEvent and I can see all my thread running
as expected, expecially my main application event loop.
>:
>: Is this a favourable assessment?

>No - GrCheckNextEvent will never block, thus your application
will use 100% CPU time, even when its not doing anything. This
CPU sucking is not generally desireable. Also, GrNextEvent is
supposed to block, possibly forever, until either keyboard, mouse,
or a programmatic timeout event occurs.



One of my thread sets a flag to update the screen without an Expose event (blitting). In This case, since GrGetNextEvent blocks, that would be a bad choice because I'll never get around to reading this flag which is in my event loop. That's why I've used GrCheckNextEvent since it will not block and I can use it in my event loop. If there is a better mechanism, my ears are opened.

Thanks,
--Robbie

_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!



Previous by date: 15 May 2006 15:16:50 +0100 Re: nxFlushReq, Robbie
Next by date: 15 May 2006 15:16:50 +0100 Re: Cross compiling Fltk/flnx, Aveek Adhya
Previous in thread: 15 May 2006 15:16:50 +0100 Re: LINK APP INTO SERVER, Greg Haerr
Next in thread: 15 May 2006 15:16:50 +0100 Re: LINK APP INTO SERVER, Greg Haerr


Powered by ezmlm-browse 0.20.