[Twisted-Python] non-blocking .read
Itamar Shtull-Trauring
itamar at itamarst.org
Wed Apr 2 13:34:15 MST 2003
On Wed, 02 Apr 2003 01:13:41 -0600
Moshe Zadka <moshez at twistedmatrix.org> wrote:
> It is often convenient in protocol implementations to just .read() as
> much as you want to. However, it is impossible in Twisted, becase
> .read() is a blocking operation. Happily, we can make blocking
> operations seem non-blocking with the use of deferred. The following
> protocol does just that:
I suspect it will be waaaaaaaay slower than the equivalent netstring
implementation.
--
Itamar Shtull-Trauring http://itamarst.org/
http://www.zoteca.com -- Python & Twisted consulting
More information about the Twisted-Python
mailing list