<div dir="ltr"><div><br></div><div class="gmail_extra"><div class="gmail_quote">On Mon, Jan 19, 2015 at 10:47 AM, Jean-Paul Calderone <span dir="ltr"><<a href="mailto:jean-paul@clusterhq.com" target="_blank">jean-paul@clusterhq.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class=""><br>
</span>A file-like interface is not particularly well-suited for asynchronous<br>
operation.  Have you looked into whether Tornado and Cyclone would<br>
actually be able to use such an interface?<br>
<br></blockquote><div><br></div><div>I don't see an immediate reason why it could not. I could be wrong on this point, however.<br><br>For example, here is an excerpt from a simple twisted protocol I wrote. The protocol spawns an external process, and reads data from stdout. <br>The class has a attribute 'request', which is the file handle generating the HTTP response.<br><br>For each chunk of data it reads, it (asynchronously) calls <br><br><div>    def outReceived(self, data):</div><div>        self.request.write(data)</div><div>        self.request.flush()</div></div><div><br></div><div>Most of the asynchronous behavior involves waiting for IO or network responses, and processing chunks (or entire responses) when available. This seems to fit this proposal well.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
And it would certainly be bad if this were the *only* interface<br>
Cryptography provided to certain functionality (which, fortunately,<br>
isn't what you're suggesting, I think).<br></blockquote><div><br></div><div>That is definitely not what I'm suggesting. Just an alternate interface for a specific option.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
Jean-Paul<br>
_______________________________________________<br>
Cryptography-dev mailing list<br>
<a href="mailto:Cryptography-dev@python.org">Cryptography-dev@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/cryptography-dev" target="_blank">https://mail.python.org/mailman/listinfo/cryptography-dev</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Dr. Michael Iverson<br>Director of Information Technology<br>Hatteras Printing</div>
</div></div>