I've written a basic API script, user enters data on a form, script goes off, looks stuff up, comes back with results.
As the info it was looking up was increasing, it was taking longer and longer, and I was getting annoyed with it.
So I converted it to use::threads;
Basically, the threads are simple, it spawns x threads simultaneously, to do the searching, and joins them immediately, hence waiting for them all to finish and reporting their results.
This works fine, the only problem is, the server sometimes doesn't kill the process anymore, and I eventually get a CGI timeout error.
Even if I put a die at the end of the script, the text "Died at ....." appears in the HTML, but the progress bar still doesn't stop, and the process doesn't disappear off my server.
If I reun the script from a command line, it runs and terminates instantly as it should.
Anyone else had a problem with multi-threaded CGI?