C Multithreaded app problem
"Ralph Spada" <[email protected]>
| Newsgroups | gmane.comp.web.fastcgi.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello, I'm trying to accomplish the following task using fastcgi, lighttpd on linux: I'm trying to write a multithreaded fastcgi server with worker threads where I have a cycle on the main() waiting with FCGX_Accept_r(). Every time a connection is received, a new worker thread is spawned to handle the (time consuming) processing. The problem is that after spawning the new thread, the main loop goes back to the FCGX_Accept_r() call closing the connection that is still being processed by the worker thread. What I need is the possibility to accept a new connection while the previous are still being processed by worker threads. The documentation, as far as I've understood, suggest the possibility of implementing something like that is possible, but I'm really missing something (in the API maybe). I'd appreciate any help. Thank you, Ralph ___________________________________ fastcgi-developers mailing list http://fastcgi.com/fastcgi-developers/