Steve Schwarz wrote:
> I've been running a local patch for a couple weeks now with following
> 1 - Added two methods to ThreadedAppServer: startRequest() and endRequest()
> methods. These methods can be used to implement page statistics and/or click
> tracking by session. Default implementation supports feature 2 below.
> 2 - Allow real time monitoring of the requests being processed by each
> thread. A new ThreadControl page has been added to the Admin context.
> Setting 'TrackThreads' to True in AppServer.config enables this feature. If
> the supplied thread2.py module is loaded requests can be cancelled via this
> 3 - Support automatically cancelling requests taking more than a
> configurable amount of time. Setting 'CancelLongRequests' to the
> number of seconds after which a request should be cancelled in the
> AppServer.config file enables this feature. This feature also requires
> 'TrackThreads' to be enabled.
> The patch is relatively small, if there is interest in looking at these
> changes and moving them into the mainline I'd be happy to forward them to
> anyone interested. Of course, comments and suggestions are very welcome.
This has now been fully implemented in the trunk and works great. The
implementation is a bit different from yours (mainly in that it is
lock-free). I think this new feature is really cool. The long-time
stability of the ThreadedAppServer is now even better (I actually never
had problems with long-running threads, but anyway, it's good to have
such a safety-net).