uasyncio: close() is synchronous method, ours is aclose() then.

pull/20/merge
Paul Sokolovsky 2015-01-02 01:23:16 +02:00
rodzic 92ef77c3d2
commit 20ddd54cb9
6 zmienionych plików z 6 dodań i 6 usunięć

Wyświetl plik

@ -18,7 +18,7 @@ def serve(reader, writer):
yield from writer.awrite(s * 100)
yield from writer.awrite(s * 400000)
yield from writer.awrite("=== END ===")
yield from writer.close()
yield from writer.aclose()
except OSError as e:
if e.args[0] == errno.EPIPE:
print("EPIPE")

Wyświetl plik

@ -7,7 +7,7 @@ def serve(reader, writer):
#print("================")
yield from reader.read()
yield from writer.awrite("HTTP/1.0 200 OK\r\n\r\nHello.\r\n")
yield from writer.close()
yield from writer.aclose()
#print("Finished processing request")

Wyświetl plik

@ -1,6 +1,6 @@
srctype = micropython-lib
type = package
version = 0.7.1
version = 0.8
author = Paul Sokolovsky
long_desc = Lightweight asyncio-like library built around native Python coroutines, not around un-Python devices like callback mess.
depends = errno, select, uasyncio.core

Wyświetl plik

@ -6,7 +6,7 @@ from setuptools import setup
setup(name='micropython-uasyncio',
version='0.7.1',
version='0.8',
description='uasyncio module for MicroPython',
long_description='Lightweight asyncio-like library built around native Python coroutines, not around un-Python devices like callback mess.',
url='https://github.com/micropython/micropython/issues/405',

Wyświetl plik

@ -7,7 +7,7 @@ def serve(reader, writer):
print((yield from reader.read()))
yield from writer.awrite("HTTP/1.0 200 OK\r\n\r\nHello.\r\n")
print("After response write")
yield from writer.close()
yield from writer.aclose()
print("Finished processing request")

Wyświetl plik

@ -126,7 +126,7 @@ class StreamWriter:
if __debug__:
log.debug("StreamWriter.awrite(): can write more")
def close(self):
def aclose(self):
yield IOWriteDone(self.s)
self.s.close()