comp.lang.ada
 help / color / mirror / Atom feed
From: "Chad R. Meiners" <crmeiners@hotmail.com>
Subject: Re: Keyboard Polling Solution
Date: Fri, 20 Feb 2004 15:59:12 -0500
Date: 2004-02-20T15:59:12-05:00	[thread overview]
Message-ID: <c15shc$293q$1@msunews.cl.msu.edu> (raw)
In-Reply-To: 4035FA69.1060301@noplace.com


"Marin David Condic" <nobody@noplace.com> wrote in message
news:4035FA69.1060301@noplace.com...
> 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.

When writing a keyboard task, I usually poll the keyboard and then delay or
sleep on a select statement.   This way I can send commands to the keyboard
task if need be.

-CRM





  reply	other threads:[~2004-02-20 20:59 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 [this message]
2004-02-22 21:26         ` Bruce or Tracy Jacobs
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