On 18/09/13 13:34, exar...@twistedmatrix.com wrote:
On 12:03 pm, p.may...@imperial.ac.uk wrote:
Is there any support, or any interest in / way to add support for
deferred cancellation in pb?
Specifically I'd like do have something like:
class blah(pb...):
def remote_somelongtask(self, args):
...
taskid = somefunc()
d = defer.Deferred(lambda : canceltask(taskid))
return d
...and on the client:
d = callRemote('somelongtask', args)
...
# now we no longer need it
d.cancel()
...and have the cancel the server-side task.
s/task/Deferred/ :)
+1 - particularly if you also want to tackle this for AMP.
I've never used (and have no particular use for) AMP so I'd have to take
a look at it. It doesn't look so hard for pb, but I have "teh fear" in
case the existing test coverage isn't good and a 10-line change would
require writing 1000 lines of tests :o(
I'll have a look, but from the responses I'll assume neither pb nor AMP
can do this, and will file a couple of tickets for reference.
_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python