From: Bruce or Tracy Jacobs <bljacobs2@mchsi.com>
Subject: Re: Keyboard Polling Solution
Date: Sun, 22 Feb 2004 21:26:17 GMT
Date: 2004-02-22T21:26:17+00:00 [thread overview]
Message-ID: <40391F75.460CFD34@mchsi.com> (raw)
In-Reply-To: 4035FA69.1060301@noplace.com
I am playing with an Ada OpenGL graphics program that allows the user to
manipulate output graphics (zoom in, out, move around, etc) but I
didn't want the entire program to stop and wait for input because it
needs to stay busy doing things.
Marin David Condic wrote:
>
> Well, there you go! I have not messed with any keyboard input in so long
> I'd completely forgotten about that. But yes, that looks like it would
> do the job.
>
> I'd be curious why you want to poll. Usually, one tries to avoid that,
> but I know I've wanted something going on in the background that might
> stop when the user hit a key. The usual trick would be to have a task
> looking at keyboard input with another task doing the background job.
> Sometimes this wouldn't work with some implementations because the I/O
> operation didn't flag the task as "blocked", so the background would
> starve. Then you might want to resort to some kind of polling.
>
> MDC
>
> Bruce or Tracy Jacobs wrote:
> > A version of Get_Immediate does this. If there is nothing in the
> > buffer, it returns
> > FALSE and lets you continue on.
> >
>
> --
> ======================================================================
> Marin David Condic
> I work for: http://www.belcan.com/
> My project is: http://www.jsf.mil/NSFrames.htm
>
> Send Replies To: m o d c @ a m o g
> c n i c . r
>
> "Face it ladies, its not the dress that makes you look fat.
> Its the FAT that makes you look fat."
>
> -- Al Bundy
>
> ======================================================================
next prev parent reply other threads:[~2004-02-22 21:26 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-18 21:37 Keyboard Polling Solution Me
2004-02-18 23:10 ` Preben Randhol
2004-02-19 0:30 ` Bruce or Tracy Jacobs
2004-02-19 11:47 ` Marin David Condic
2004-02-19 22:57 ` Bruce or Tracy Jacobs
2004-02-20 12:15 ` Marin David Condic
2004-02-20 20:59 ` Chad R. Meiners
2004-02-22 21:26 ` Bruce or Tracy Jacobs [this message]
2004-02-23 10:40 ` Preben Randhol
2004-02-25 0:44 ` Bruce or Tracy Jacobs
2004-02-25 2:05 ` Chad R. Meiners
2004-03-03 16:20 ` Me
2004-02-20 21:38 ` Warren W. Gay VE3WWG
2004-02-22 21:30 ` Bruce or Tracy Jacobs
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox