in reply to Re^6: [FCGI.pm] - not threads-safe?
in thread [FCGI.pm] - not threads-safe?
why there is no sense to use FastCGI with threads?
Because FastCGI and FCGI have been developed to expect the forking model -- ie. separate processes with no shared state. They therefore have never been designed to be thread-safe.
That's not to say that a FastCGI-style of operation -- persistent perl instances servicing many serial connections -- wouldn't be possible; and perhaps even effective; but it would need to be written from the ground up to understand the environment it is operating in and be thread-safe from the get-go.
It would be a different animal with different requirements and you will not get anywhere trying to slap threads on top of FCGI.
If you need more concurrency, start more FastCGI handler processes. That's the way it is designed to work.
What is the difference between threads and forked processes in this context
Sorry to put it this way, but if you do not understand that difference; you should not be using threads.
Please, explain in few words.
Not possible; which I why I suggested you go do some reading.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^8: [FCGI.pm] - not threads-safe?
by zdm (Beadle) on Aug 20, 2013 at 17:37 UTC | |
by BrowserUk (Patriarch) on Aug 20, 2013 at 19:07 UTC |