Wykres commitów

672 Commity (e3903c9f6416e397704f22f5e6600dd169e5d9b6)

Autor SHA1 Wiadomość Data
Paul Sokolovsky 680e52d89e timeit: Release 3.3.3-1. 2015-01-06 01:05:31 +02:00
Paul Sokolovsky f58f4ec20a timeit: Explicit module docstring. 2015-01-06 01:05:25 +02:00
Paul Sokolovsky 4b719f468f timeit: Add from CPython 3.3.3. 2015-01-06 01:05:17 +02:00
Paul Sokolovsky 46458ef879 time: Release 0.2. 2015-01-05 00:36:26 +02:00
Paul Sokolovsky f9fe0185ba time: Dummy implementation of perf_counter() & process_time().
Redirect to time() and clock() respectively.
2015-01-05 00:34:18 +02: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 8c7a4194d7 time: Initial cut at implementing strftime() (via ffi). 2015-01-04 00:41:44 +02:00
Paul Sokolovsky e413ba6d87 cpython-uasyncio: Add StreamWriter with awrite() & aclose(). 2015-01-02 22:25:53 +02:00
Paul Sokolovsky 083ad0e94c cpython-uasyncio: uasyncio compatibility module for CPython.
Implements scheduling a coroutine by yielding it.

Related discussion:
https://groups.google.com/d/msg/python-tulip/emU4_qyPVQM/eS8G0bnmBIEJ
2015-01-02 21:25:57 +02:00
Paul Sokolovsky d4968384ad make_metadata.py: Add "cpython-backport" module type.
For compatibility modules, allowing to run code using MicroPython-specific
modules on CPython: https://github.com/micropython/micropython-lib/issues/18
2015-01-02 21:25:57 +02:00
Paul Sokolovsky 20ddd54cb9 uasyncio: close() is synchronous method, ours is aclose() then. 2015-01-02 01:51:44 +02:00
nvbn 92ef77c3d2 contextlib: Make compatible with micropython 2014-12-26 19:57:10 +02:00
nvbn 5557382b5e contextlib: Add contextlib from cpython 3.4.2. 2014-12-26 19:41:57 +02:00
Paul Sokolovsky 8bed308f41 fcntl: Add error checking and at least TODOs about buffer return values. 2014-12-25 20:42:09 +02:00
Paul Sokolovsky 777129064b fcntl: fcntl/ioctl arg defaults to 0 per CPython. 2014-12-24 17:58:39 +02:00
Paul Sokolovsky ec4217b8fa fcntl: Implement fcntl/ioctl variants which take memory buffer as arg. 2014-12-23 00:56:43 +02:00
nvbn 4dbb10e39d uasyncio.queues: Add simple implementation of asynchronous queues for uasyncio 2014-12-19 19:07:59 +02:00
Paul Sokolovsky 1387950bb0 time: Add dummy "time" module, following renaming builtin to "utime". 2014-12-17 00:36:04 +02:00
Paul Sokolovsky 8b2a51a7f4 uasyncio.core: Release 0.8.3. 2014-12-17 00:34:14 +02:00
Paul Sokolovsky db6c9fbaa9 uasyncio.core: Follow builtin "time" module rename to "utime". 2014-12-17 00:33:04 +02:00
Paul Sokolovsky 14b6b6945b uasyncio.core: Doesn't depend on heapq module for some time now. 2014-12-17 00:31:51 +02:00
nvbn c7a9f63686 unittest: Add `assertFalse` to `TestCase` 2014-12-15 18:03:58 +02:00
nvbn e1f42dcd91 collections.deque: Speedup `appendleft`, implement `__iter__` and `__str__` 2014-12-15 03:29:06 +03:00
Paul Sokolovsky 68f41ae667 collecions.deque: Release 0.1.1. 2014-12-14 20:09:21 +02:00
Paul Sokolovsky df85a27af4 collections.deque: Optimize __bool__(). 2014-12-14 20:06:10 +02:00
nvbn 79b59e56f4 collections.deque: Add support of __bool__().
To support `if deque_inst` and similar.
2014-12-14 20:04:18 +02:00
nvbn e895931750 collections.deque: Add support of len(). 2014-12-14 20:03:48 +02:00
Paul Sokolovsky 171717dc8a uasyncio: Add automated script for validation testing with Boom. 2014-11-27 22:15:36 +02:00
Paul Sokolovsky 1bb98d55cc logging: Set default level as INFO, DEBUG is too spammy. 2014-11-14 02:43:09 +02:00
Paul Sokolovsky 728434bb67 uasyncio.core: Update description, don't bite at asyncio's side ;-). 2014-11-13 06:41:15 +02:00
Paul Sokolovsky b88cb425f8 uasyncio.core: Typo fix in recently added .create_task() method. 2014-11-13 06:41:05 +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 3ce9d1b5e7 select: Release 0.1.1. 2014-11-04 02:57:19 +02:00
Paul Sokolovsky 79c3d93fa1 uasyncio: Release 0.7.1. 2014-11-04 02:55:40 +02:00
Paul Sokolovsky 6b5cccaefa uasyncio.core: Release 0.8. 2014-11-04 02:55:21 +02:00
Paul Sokolovsky acbc5e462f uasyncio.core: Implement EventLoop.create_task(), new method in Python 3.4.2.
This method allows to schedule a coroutine in a loop without confusing globals
like async() or Task().
2014-11-04 02:52:31 +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 9bb4f6b3b1 uasyncio.core: Implement async() and Task() for CPython compatibility. 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 89f3b75b72 select: Add defines for EPOLLONESHOT & EPOLLET. 2014-11-03 00:40:33 +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 cbaf0d3b57 uasyncio.core: Log only if __debug__==True (i.e. no optimization). 2014-10-26 00:20:45 +03:00
Paul Sokolovsky b684b448d1 test.pystone: Add pristine from Python-3.3.3 tarball. 2014-10-25 22:19:01 +03:00
Paul Sokolovsky 943fbb6efc errno: Add ECONNRESET. 2014-10-25 00:07:26 +03:00