Chris Withers writes:
Dieter Maurer wrote:
I fear you will need to modify ZServer for that.
ZServer decouples the production process from the delivery process, writing the data to a file if necessary.
is this the reason that if you accidentally trigger a very expensive method through a browser you can't stop it by hitting the 'stop' button, you just have to watch your server crawl through the method and slowly come back to life? That is part of it.
As I told you in an earlier message, Python does not provide for means to interrupt/abort a thread. Therefore, if your method computes or waits for an external result, it is not interruptible. However, if ZServer would not decouple the response process, then the method could recognize the channel closure as soon as it writes to the channel. As I write this, I recognize that this is independent, of whether or not ZServer decouples. The channel could forward the error in any case, only with different means. However, this would usually only be effective for methods that use "RESPONSE.write" as normally, the complete result is computed before sending the response starts. Dieter