Suppose a view, handling a POST, has to perform some task that can be
reasonably expected to take a lot of time, long enough that it will
often cause a timeout somewhere in the chain (between browser and
webserver, between webserver and fastcgi server, etc).  Suppose the view
(as naively implemented) tries to do the normal thing and redirects to a
GET version of itself after handling the post.  What's the best way to
prevent the timeout?  Use a thread or os.fork() to do the work in the
background, and go right ahead with the redirect?  Do the work in the
background and redirect after sleeping a little or via a temporary page,
even though you don't know for sure that the job is done?  Is it even
safe to use a thread or forked process to do the work?
-- 
+----------------------------------------------------------------+
| Jason F. McBrayer                         [EMAIL PROTECTED]  |
|  "If you wish to make Pythocles wealthy, don't give him more   |
|   money; rather, reduce his desires."            -- Epicurus   |

Reply via email to