Dear Graham,
Could we add your following command to the http://code.google.com/p/modwsgi/wiki/RegisteringCleanupCode page ?
Do realise though that such action still take place in context of lifetime of open connection. So, although you could trigger a cleanup action in this way, for it not to still see connection being held open, you would need to use some mechanism to background the task. For example, have a manager thread which processes jobs placed in an internal task queue.