On 27 September 2014 08:21, Benoit Chesneau <bchesn...@gmail.com> wrote:
>
>
> On Fri, Sep 26, 2014 at 5:32 AM, Robert Collins <robe...@robertcollins.net>
> wrote:
...
>> So I propose we drop the write callable, and include a queue based
>> implementation in the adapter for PEP-3333 code.
>>
>> -Rob
>>
>
> What would be the advantage of using a queue compared to simply write to the
> server? Internally the server can use queue, but why the client should know
> it? What is the reasoning behind it?

The point is to remove the complexity of having both an iterator over
content *and* a write method.

Thats really complex for server [and middleware] writers. So the
interface to send bytes to the container would just be 'yield them'.
(Or return a fully populated list).

So the point about the Queue is that to support PEP-3333 we either
need to retain the write() callable, or we need an adapter that can
expose on its upper side the iterator we want, and on the lower side
accept *either* an iterator  *or* use of  write() method - I think
you'll find thats quite hard to write without a Queue or similar
construct.

-Rob

-- 
Robert Collins <rbtcoll...@hp.com>
Distinguished Technologist
HP Converged Cloud
_______________________________________________
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe: 
https://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com

Reply via email to