Craig,

If I understand what you want to do, I've done a little like that with modifications mostly to the worker MPM for httpd-2.1. The patch is here -
http://apache.org/~gregames/event.patch .


But I was primarily interested in low hanging fruit - threads that are between HTTP requests. I picked them because they don't need a lot of state information to be saved and restored when the connection changes threads, and because we often see a lot of threads tied up in keepalive timeouts and lingering close processing.

If you want to exit a thread while it is executing a handler which is doing database calls, there will be a lot more state that needs to move between threads. But maybe this will give you a start.

Good luck,
Greg

p.s. disclaimer - the event.patch has some known issues posted at http://apache.org/~gregames/event.laundry_list

Craig S wrote:
After digging into the code (nice job by the way, it
is  very easy to follow), it looks like there is no
way to do what I want without modifications to the
core server (the worker code).

Has there been any discussion about having handlers
return a DEFERRED indication up to process_socket(),
so the transaction information can be saved until a
later event can answer the request?

-Craig



--- Craig S <[EMAIL PROTECTED]> wrote:


From what I can tell, Apache passes a request to a
handler and expects a result to be written by that
handler. What I want to do is send information from
the message to do a query of a database that will
return an answer later on. I'd like to return from
the
handler and create the result page later on when the
answer comes back.


My hope is to reduce the need for multiple threads
or
processes.

Any pointers?

Thanks,

-Craig




Reply via email to