kopia lustrzana https://github.com/micropython/micropython-lib
uasyncio: close() is synchronous method, ours is aclose() then.
rodzic
92ef77c3d2
commit
20ddd54cb9
|
@ -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")
|
||||
|
|
|
@ -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")
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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")
|
||||
|
||||
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue