[Fontconfig] Race condition on updating cache

Akira TAGOH akira at tagoh.org
Wed Oct 2 00:18:02 PDT 2013

On Wed, Oct 2, 2013 at 4:07 AM, Akira TAGOH <akira at tagoh.org> wrote:
> Right. that said I suppose it may be useful only when it is the
> singleton process, in fact this issue happened with sleep one second.
> at least waiting for one sec just before exiting didn't help. it might
> be better moving between reading the directory and writing the cache
> perhaps. so it might catches up updates on reading caches. let me try
> that later.

That also works but we need to support the parallel updates on
fc-cache by threading then. otherwise it's quite stressful to wait
for. but it may takes more time if the directory structure where is
updating is too deep, because there are no way to know how many sub
directories it contains until a cache is updated. so just updating
twice seems realistic at this moment. this may be a todo task for
future improvement.


More information about the Fontconfig mailing list