On Thu, Mar 6, 2008 at 10:46 AM, Andrew McNabb <[EMAIL PROTECTED]> wrote: > On Thu, Mar 06, 2008 at 10:28:26AM -0500, Jean-Paul Calderone wrote: > > > This... I don't understand. A callback is just an object which is > callable, > > often with some arguments. I would generally use the word "callback" to > > describe what `someMoreRequestDataReceived´ is. Why do you think it > doesn't > > qualify, and what do you mean when you say "callback"? > > Sorry about the confusion (callback as noun vs. callback as verb). When > I said callback, I meant the verb: > > some_deferred.callback(some_value) > > I want to go through the normal callback/errback mechanism rather than > creating a brand new system to do the same thing. Ideally we'd be able > to callback a single deferred multiple times (maybe it would be a > "MultiDeferred" rather than "Deferred"). This way you wouldn't have to > call addCallback over and over. > > Does that make my point more clear?
This is really overcomplicating things. Calling a method repeatedly with some data is a very simple and very effective and very conventional way (not a "new system!") of streaming some data to an object. This is how our protocol system works: IProtocol.dataReceived gets called every time some data comes in over the network. LineReceiver.lineReceived gets called every time a line is received. In this case, IStreamingRequestHandler.streamingDataReceived could be called. I think you should take exarkun's advice. Adding deferreds will just make it pointlessly complicated and slower than it needs to be. -- Christopher Armstrong International Man of Twistery http://radix.twistedmatrix.com/ http://twistedmatrix.com/ http://canonical.com/
_______________________________________________ Twisted-web mailing list [email protected] http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
