Paul Sokolovsky
eecd6c755c
asyncio_micro: Optimize size of SysCall objects.
...
We have to have type header for any object, so use type to "store"
information about syscall type (my initial idea was to have single
syscall class and dispatch on its attribute, that would save memory
on having bunch of classes, but would increase size of each syscall
object).
2014-10-11 05:19:51 +03:00
Paul Sokolovsky
123b8cc1ee
asyncio_micro: Move handle() method to SysCall base class.
2014-10-11 05:19:51 +03:00
Paul Sokolovsky
6d8cfcde46
asyncio_micro: Clean up logging.
2014-10-11 05:19:51 +03:00
Paul Sokolovsky
26d76576e4
asyncio_micro: Support just plain "yield" for cooperative control yield.
2014-10-11 05:19:51 +03:00
Paul Sokolovsky
ae4fa7f93a
asyncio_micro: Rename StreamWriter.write() to awrite().
...
This method has different semantics than original asyncio, so rename to avoid
confusion. Original asyncio's is not a coroutine, while ours is.
2014-10-11 05:19:51 +03:00
Paul Sokolovsky
fe23bdfa18
asyncio_micro: Add basic HTTP server example.
2014-10-11 05:19:51 +03:00
Paul Sokolovsky
1d9f7856f6
asyncio_micro: Implement proper write() handling.
...
TODO: Test!
2014-10-11 05:19:51 +03:00
Paul Sokolovsky
27546eaf53
asyncio_micro: Support readall semantics and handle non-blocking read() well.
...
Non-blocking read()/write() may return None if there's no data, and that's
not EOF.
2014-10-11 05:19:51 +03:00
Paul Sokolovsky
875de44134
asyncio_micro: Add support for starting a coroutine concurrently.
...
Just yield it as a value. Also, improve logging/error reporting.
2014-10-11 05:19:51 +03:00
Paul Sokolovsky
48671ce22e
asyncio_micro: IODone syscall should return to coroutine.
2014-10-11 05:19:50 +03:00
Paul Sokolovsky
4218e7d504
asyncio_micro: Implement start_server().
2014-10-11 05:19:50 +03:00
Paul Sokolovsky
4e3964d3ff
asyncio_micro: StreamReader, StreamWriter: add more methods.
2014-10-11 05:19:50 +03:00
Paul Sokolovsky
6f27ec1cd0
asyncio_micro: Work around stupid Python closures.
...
Which don't close variables, just variable references.
2014-10-11 05:19:50 +03:00
Paul Sokolovsky
a728368a08
asyncio_micro: Rename from asyncio.
...
As this is not compliant with asyncio API, can't be called asyncio, and
"micro" is just good moniker for what it's intended to be.
2014-10-11 05:19:50 +03:00