Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: Optimizing plugin-shutdowns using threads

Re: Optimizing plugin-shutdowns using threads

From: Timo Horstschäfer <mail_at_timo-horstschaefer.de>
Date: Sat, 17 Mar 2007 15:01:59 +0100

Jonathan Gordon wrote:
> > >Timo Horstschäfer wrote:
> > >I think some kind of a disk write-queue would achieve the same.
> > >Or maybe just a global write buffer, that flushes on every disk spin up.
> >
> > Thats surely a better idea, and i think it could be used in general, not
> > only in plugins. Would it be hard to code?
>
> This exists already, but isnt really useable in the current form for
> plugins. The way it works is a function registers a callback for when the
> disk is going to spin down... but this wont work for functions because they
> may not be in memory at that point anymore.
A write-buffer would be independant from plugins. The write function would
just return immediately and I think it's causing the hang when exiting a
plugin.
Also the write-buffer may slightly increase the battery runtime because of
less disk spin ups.

 --
  Timo Horstschäfer
Received on 2007-03-17


Page was last modified "Jan 10 2012" The Rockbox Crew
aaa