Hi all!
I'm currently working on beating mod_disk_cache into submission, with
the goal of it being able to deliver data while caching a file (this
started as bug #39380). I have solved most of the problems, I'll
submit patches when they have passed the scrutiny of my fellow
computer club admins. The goal is to make the thing usable on
http://ftp.acc.umu.se/ after all (and no, we don't have a budget so we
can't compensate bad code with more hardware ;).
Anyhow, my real question: What's the "right" way to spawn a child in
modules?
The problem is that the current mod_disk_cache design means that the
first one to request an uncached file gets to wait until it's cached,
since the caching is done by that request. That can be a long time to
wait for a reply when you're caching a 4GB DVD image from a slow
backend.
The naive solution is to spawn a child that does the copying letting
the request be processed simultaneously. Is this doable?
Would it be considered offensive to do apr_thread_create() if threads
are available and fork() otherwise?
Other ways to solve this?
/Nikke
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Niklas Edmundsson, Admin @ {acc,hpc2n}.umu.se | [EMAIL PROTECTED]
---------------------------------------------------------------------------
This building is so high, the elevator shows movies.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=