[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20060730114446.GA4898@suse.cz>
Date: Sun, 30 Jul 2006 13:44:47 +0200
From: Vojtech Pavlik <vojtech@...e.cz>
To: Valdis.Kletnieks@...edu
Cc: Shem Multinymous <multinymous@...il.com>,
Pavel Machek <pavel@...e.cz>,
"Brown, Len" <len.brown@...el.com>,
Matthew Garrett <mjg59@...f.ucam.org>,
kernel list <linux-kernel@...r.kernel.org>,
linux-thinkpad@...ux-thinkpad.org, linux-acpi@...r.kernel.org
Subject: Re: Generic battery interface
On Sun, Jul 30, 2006 at 04:35:57AM -0400, Valdis.Kletnieks@...edu wrote:
> On Sat, 29 Jul 2006 12:48:51 +0300, Shem Multinymous said:
>
> > The lazy polling approach I described in my last post to Vojtech
> > ("block until there's a new readout or N milliseconds have passed,
> > whichever is later") looks like a more general, accurate and efficient
> > interface.
>
> That's not good.
>
> If the program says '100ms' because it knows it will need to do a GUI update
> then, and you block it for 5 seconds because that's when the next value
> update happens, the user is stuck looking at their gkrellm or whatever not
> doing anything at all for 4.9 seconds....
>
> This almost forces the use of multiple threads if the program wants to do
> its own timer management.
The application can use select() to wait both for any X events it needs
to service and for the data update at the same time, right?
--
Vojtech Pavlik
Director SuSE Labs
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists