Wykres commitów

87 Commity (b89114c8345e15d360c3707493450805c114bc8c)

Autor SHA1 Wiadomość Data
Paul Sokolovsky 65fb3707ba all: metadata.txt: Bump version for gzip 4k conversion. 2016-10-11 06:46:12 +03:00
Paul Sokolovsky 6f7bed1c53 uasyncio: test_http_server_heavy.py: Comment out mem_info() call. 2016-01-11 00:07:43 +02:00
Paul Sokolovsky 86692631c1 uasyncio: Add missing Boom HTTP testing tool support script. 2016-01-10 23:39:40 +02:00
Paul Sokolovsky e9648dad01 uasyncio: Release 0.9. 2015-12-13 01:55:06 +02:00
Paul Sokolovsky 5e10ef8adf uasyncio: Switch to builtin uselect.poll() object.
This is a big step towards supporting uasyncio on baremetal builds (and
on unix builds without FFI support).
2015-12-13 01:46:05 +02:00
Paul Sokolovsky b4b19f1dce uasyncio: Schedule simple I/O completion callbacks directly in event loop.
Simple == without args. This is expected action for them, and saves creation
of lambda just for that. Actually, probably all callbacks should be handled
this way.
2015-12-11 22:53:29 +02:00
Paul Sokolovsky 7cd53c8bf8 uasyncio: IORead/IOWrite syscalls don't return anything.
Their semantics is "wait for I/O of given type on object passed as argument",
so return value would be the same as argument, and thus no need to bother
to store/pass it around.
2015-12-10 00:29:10 +02:00
Paul Sokolovsky 17d96d35b5 uasyncio: Optimize reader/writer callbacks with no arguments.
Avoids allocating tuples.
2015-12-07 01:13:00 +02:00
Paul Sokolovsky 7fe611172f uasyncio/benchmark: Default is "medium" test, add CPython support. 2015-06-21 02:03:42 +03:00
Paul Sokolovsky 1251e83b6c uasyncio/benchmark: Add "medium load" server, serving 12K output per request. 2015-06-21 02:03:37 +03:00
Paul Sokolovsky 68b30061bc uasyncio/benchmark: CPython asyncio compatibility.
Unlimited .read() doesn't play well with it.
2015-06-21 02:00:42 +03:00
Paul Sokolovsky 0ce0123ab5 uasyncio/benchmark: Update for latest uasyncio/micropython. 2015-06-21 01:59:34 +03:00
Damien George 72d1f5ecfa uasyncio: Add StreamWriter.get_extra_info() to get peername.
This is the standard way of getting the name of the client that is
connected.
2015-06-03 13:25:27 +00:00
Paul Sokolovsky 1cbd5591f9 uasyncio: Release 0.8.1. 2015-01-04 22:01:36 +02:00
Paul Sokolovsky 99fa203686 uasyncio: StreamReader.close() -> .aclose().
Note: CPython asyncio lacks .close() on StreamReader at all, only StreamWriter
has it.
2015-01-04 21:47:06 +02:00
Paul Sokolovsky 20ddd54cb9 uasyncio: close() is synchronous method, ours is aclose() then. 2015-01-02 01:51:44 +02:00
Paul Sokolovsky 171717dc8a uasyncio: Add automated script for validation testing with Boom. 2014-11-27 22:15:36 +02:00
Paul Sokolovsky c1159a477e uasyncio: Add automated script for performance testing with Apache Bench. 2014-11-12 23:43:28 +02:00
Paul Sokolovsky 5601371cf0 uasyncio: Add instructions for testing/benchmarking. 2014-11-11 23:17:35 +02:00
Paul Sokolovsky 4fc39d86af uasyncio: start_server(): Add listen backlog arg, default to 10. 2014-11-06 17:14:50 +02:00
Paul Sokolovsky 79c3d93fa1 uasyncio: Release 0.7.1. 2014-11-04 02:55:40 +02:00
Paul Sokolovsky e9c7fa43f4 uasyncio: Set EpollEventLoop in a new way after .core refactor. 2014-11-04 02:52:31 +02:00
Paul Sokolovsky 0a529adfdc uasyncio: Use EPOLLONESHOT flag for add_reader/writer().
When we issue IORead/IOWrite syscall, we want get back notification just for
that call. But if we add fd to epoll, it will trigger continuously when the
condition is met. For example, a socket with empty write buffer will always
signal EPOLLOUT, regardless if we want to write to it now or not. This will
lead to situation when our coro will be woken up on such socket on *any*
syscall, and this syscall will get completely different socket as result (
or if syscall doesn't return socket - completely different result value).

So, to get semantics right, we need to make sure that for each IORead/IOWrite,
we get notified only once, and further events on socket are ignored until
we ask for them again. This is exactly what EPOLLONESHOT flag does.

The other alternative is to remove fd from epoll after each IORead/IOWrite,
but apparently EPOLLONESHOT is more performant way.

Yet another alternarnative would be to use edge-triggered mode of epoll,
but it has own peculiarities, like, after each event, client must make sure
that it is handled completely and reset, otherwise it may not trigger again,
even if there's unprocessed data. For example, if EPOLLIN|EPOLLET is used,
client must make sure that it reads all data available, until read() returns
EAGAIN. If it reads say just 10 bytes, then next time event simply won't
trigger (because it's edge event, which triggers on change like "no data" -
"data"; if we didn't read all data, the situation is "data" - "data", there's
no change in condition, and event is not triggered). Surely, that's not what
we want (at least not without restructuring how StreamReader works).

So, EPOLLONESHOT is the most obvious, and easiest to reason way to get needed
semantics.
2014-11-03 00:41:00 +02:00
Paul Sokolovsky 2a26ee80b7 uasyncio: Add checks that IOWrite() syscall return us socket we expect.
One check is commented by default to not hurt performance.
2014-11-03 00:40:52 +02:00
Paul Sokolovsky 610aa65cef uasyncio: Add StreamReader.close() method. 2014-10-29 00:55:10 +02:00
Paul Sokolovsky e8b99addbd uasyncio: Ignore ENOENT on remove_writer().
StreamWriter.awrite() first tries to write to an fd, and if that succeeds,
yield IOWrite may never be called for that fd, and it will never be added
to poller. So, ignore such error.
2014-10-27 00:30:40 +02:00
Paul Sokolovsky 0fcb1daa81 uasyncio: Log only if __debug__==True (i.e. no optimization). 2014-10-26 00:20:53 +03:00
Paul Sokolovsky 4a884ef849 uasyncio: Split off uasyncio.core dist module. 2014-10-24 01:00:53 +03:00
Paul Sokolovsky 2b582fd934 uasyncio: Cleanup module imports after split up. 2014-10-24 00:32:32 +03:00
Paul Sokolovsky b2130c84ce uasyncio: Split into "core" and "extended" modules. 2014-10-24 00:24:13 +03:00
Paul Sokolovsky a295825300 uasyncio: Convert to package. 2014-10-24 00:04:37 +03:00
Paul Sokolovsky 35f4720962 uasyncio: test_http_client.py: Use run_until_complete(). 2014-10-24 00:03:27 +03:00
Paul Sokolovsky 1256840278 uasyncio: Release 0.6.2. 2014-10-21 01:31:59 +03:00
Paul Sokolovsky a776b5086e uasyncio: Add __repr__() for StreamReader/StreamWriter. 2014-10-21 01:31:58 +03:00
Paul Sokolovsky 0a20a84f61 uasyncio: Implement run_until_complete(). 2014-10-21 01:31:58 +03:00
Paul Sokolovsky 4d0d71f974 uasyncio: Update for rename microsocket -> usocket. 2014-10-21 01:31:58 +03:00
Paul Sokolovsky 8e97b6972a uasyncio: Rename asyncio_micro to uasyncio. 2014-10-21 01:31:58 +03:00