Wykres commitów

64 Commity (51cd47ae2f16aa1ca3710717ea1abef51ebc3b1a)

Autor SHA1 Wiadomość Data
Paul Sokolovsky e046338ea2 uasyncio.core: Release 1.5.1, updated description. 2017-10-28 22:52:15 +03:00
Paul Sokolovsky a314da83f1 uasyncio.core: logging is not longer hard dependency, remove it.
If user is going to enable logging in particular app, they should depend
on it themselves.
2017-10-28 02:17:24 +03:00
Paul Sokolovsky 62fbfa9965 uasyncio.core: Add yield call to remove coro from scheduling.
yield False won't reschedule current coroutine to be run again. This is
useful when coro is put on some waiting queue (and is similar to what
yield IORead/yield IOWrite do).
2017-10-28 02:14:02 +03:00
Paul Sokolovsky ec67618df1 uasyncio.core: Release 1.5. 2017-09-01 15:14:32 +03:00
Paul Sokolovsky 79f13b6e4a uasyncio.core/test_full_wait: Update for .wait() called on each loop iter.
This fixes this mock test after the recent change to make I/O scheduling
fair.
2017-08-20 17:06:07 +03:00
Paul Sokolovsky eef054d98a uasyncio.core: Make I/O scheduling fair wrt to computational scheduling.
If there is a coroutine to run immediately (with wait delay <= 0),
uasyncio.core never called .wait() method, which is required to
process I/O events (and schedule coroutines waiting for them). So
now, call .wait(0) even if there's a coroutine to run immediately.
2017-08-20 17:04:31 +03:00
Paul Sokolovsky a4b75ab2bf uasyncio.core: Release 1.4.2. 2017-06-08 02:48:45 +03:00
Paul Sokolovsky b9540e4afe uasyncio.core: Use "uasyncio.core" logger. 2017-06-08 02:48:04 +03:00
Paul Sokolovsky 21d60a8b5f uasyncio.core: Release 1.4.1. 2017-05-23 01:27:33 +03:00
Paul Sokolovsky e13e139f51 uasyncio.core: Don't feed old send arguments into next coro invocation.
As all current syscalls don't return any value, there's nothing to feed
actually.
2017-05-23 01:26:08 +03:00
Paul Sokolovsky 191de78b16 uasyncio.core: Release 1.4. 2017-05-22 13:58:51 +03:00
Paul Sokolovsky c01004d71f uasyncio.core: Add test for callback args to call_soon(). 2017-05-22 13:57:57 +03:00
Paul Sokolovsky 241e7b1a3b uasyncio.core: Add stop() method for loop.
To allow to stop loop from a callback function.
2017-05-22 13:49:27 +03:00
Paul Sokolovsky bf327f755a uasyncio.core: Fix args handling for call_soon/call_later/call_later_ms. 2017-05-22 13:21:54 +03:00
Paul Sokolovsky 22cd93fb1a uasyncio.core: Release 1.3. 2017-05-16 23:01:03 +03:00
Paul Sokolovsky 9b5cbcdfce uasyncio.core: test_full_wait: Update for call_later_ms(). 2017-05-16 21:54:21 +03:00
Paul Sokolovsky 4fa29d867a uasyncio.core: Remove call_at() which takes absolute second time.
uasyncio uses different timebase than CPython's asyncio, so absolute
time scheduling compatible with it is impossible. Instead, there's
call_at_() which schedules using modular millisecond time.
2017-05-16 21:53:29 +03:00
Paul Sokolovsky ad73ee3043 uasyncio.core: Use finalized name for call_later_ms(). 2017-05-16 21:53:29 +03:00
Paul Sokolovsky 61392cb641 uasyncio.core: Remove unused Sleep syscall.
It's unused since since sleep() was switched to yield an integer for
delay.
2017-05-16 21:45:13 +03:00
Paul Sokolovsky 3ef991c115 uasyncio.core: Remove legacy commented code for add_reader/add_writer. 2017-05-14 16:38:32 +03:00
Paul Sokolovsky 36744578e2 uasyncio.core: Release 1.2.1. 2017-05-01 16:10:51 +03:00
Paul Sokolovsky aea501add6 uasyncio.core: Import utime unconditionally, uasyncio depends on MicroPython. 2017-05-01 16:09:34 +03:00
Paul Sokolovsky b2f69eb23b uasyncio.core: Add set_debug() method, don't import logging if not called. 2017-05-01 16:04:28 +03:00
Paul Sokolovsky 5cf6600e5e uasyncio.core: Release 1.2. 2017-04-20 21:32:07 +03:00
Paul Sokolovsky bb3057ffed uasyncio.core: Fix scheduling in the presense of I/O completion callbacks.
wait() may finish prematurely due to I/O completion, and schedule new,
earlier than before tasks to run. So, after call to wait(), we need to
check current time and time of head task, and continue to wait if needed.
Recently introduced provisional utimeq.peektime() is used to optimize
querying time of a head task.
2017-04-08 01:34:57 +03:00
Paul Sokolovsky aa9bbe839e uasyncio.core: Add test for full wait for a time-scheduled coro.
Specifically, that a coroutine scheduled to run at some time (after some
delay) waits requested time before it's run and not run prematurely in
case an I/O completion happens before it.
2017-03-12 16:02:06 +03:00
Paul Sokolovsky 48ead94116 uasyncio.core: Add test for fair scheduling. 2017-03-06 12:16:34 +01:00
Paul Sokolovsky 853535802f uasyncio.core: Release 1.1.1. 2017-02-15 23:49:39 +03:00
Paul Sokolovsky 55b4161512 uasyncio.core: Set lower default queue len and allow to override it.
The default is set to be under 0.5K on 32-bit system. A queue length
can be passed to get_event_loop() to override it.
2017-02-15 03:27:59 +03:00
Paul Sokolovsky 3e37bdda56 uasyncio: Move test_call_soon.py to uasyncio.core, as it needs only it.
Also, rename as example.
2017-01-04 18:01:05 +03:00
Daniel Mizyrycki 0f5d5cead7 uasyncio: Add minimum esp8266 support 2017-01-01 18:17:17 -08:00
Paul Sokolovsky f7c5fe1aea uasyncio.core: Release 1.1. 2016-12-30 22:29:19 +03:00
Paul Sokolovsky 9d5919dd1c uasyncio.core: Implement sleep_ms as an awaitable object instead of coro.
This allows to await it without heap allocation.
2016-12-26 19:51:11 +03:00
Paul Sokolovsky 793bc05be5 uasyncio.core: Report unknown syscalls. 2016-12-26 19:11:38 +03:00
Paul Sokolovsky 24125191ce uasyncio.core: Convert Sleep syscall arg (seconds) to milliseconds. 2016-12-23 00:35:42 +03:00
Paul Sokolovsky 222758f0c2 uasyncio.core: Switch to dedicated utimeq class.
Allows zero-allocation scheduling of tasks. As long as tasks don't use
await/yield from with coroutines, and don't allocate memory themselves,
there will be no allocation and GC.
2016-12-22 13:04:09 +03:00
Paul Sokolovsky 2e5c021515 uasyncio.core: Release 1.0. 2016-11-13 15:17:18 +03:00
Paul Sokolovsky f24493b1eb uasyncio.core: create_task: Fix scheduling.
Should start with zero delay, not at zero absolute time.
2016-11-13 15:01:51 +03:00
Paul Sokolovsky b3c2d0f51e uasyncio.core: Add additional debug output control.
__debug__ isn't flexible enough, if you don't disable it, there's huge
memory allocation.
2016-11-13 14:59:49 +03:00
Paul Sokolovsky 02a6625a00 uasyncio.core: Introduce "trailing _" functions which avoid arg un/packing.
They just take tuple of arguments instead of *args. In most cases, that
will be () singleton.
2016-11-13 14:59:49 +03:00
Paul Sokolovsky f5ae66973d uasyncio.core: Remove heapq aggregate structure workaround. 2016-11-13 01:44:35 +03:00
Paul Sokolovsky d9e72f1d40 uasyncio.core: Switch to ticks_ms() as timing source.
This makes uasyncio.core compatible with baremetal/embedded ports.

Includes switching to "uheapq timeq" for task queue.
2016-11-13 01:32:32 +03:00
Paul Sokolovsky dfe4dee62a all: setup.py: New releases for gzip 4k conversion. 2016-10-11 06:47:01 +03:00
Paul Sokolovsky 65fb3707ba all: metadata.txt: Bump version for gzip 4k conversion. 2016-10-11 06:46:12 +03:00
Paul Sokolovsky 38885fbf4f uasyncio.core: Protect another case of debug logging with "if __debug__:". 2016-07-04 12:58:40 +03:00
Paul Sokolovsky 26290883a2 uasyncio.core: call_soon(): Use current time, not zero time.
Using static zero time may become a problem when using wrap-around time
sources, like utime.ticks_ms().
2016-07-04 12:57:53 +03:00
Paul Sokolovsky 0e0fffc138 uasyncio.core: Optimize case of resuming coro with no args.
Don't create a new tuple with empty arguments for coro.send(), just use
next(coro).
2016-07-04 12:57:08 +03:00
Paul Sokolovsky f64570ba71 uasyncio.core: Release 0.9.1. 2016-05-28 02:38:03 +03:00
Paul Sokolovsky e6ca37faa8 uasyncio.core: async() was renamed to ensure_future() upstream.
The old name is deprecated since CPyton 3.4.4. That's great relief, because
CPython has special parser hacks to support both 3.5-style "async" keyword,
and still allow it be used as an identifier in other contexts. MicroPython
lacks such hacks, so "async" is SyntaxError as a function name with the latest
versions which implement async keyword.
2016-05-28 02:36:41 +03:00
Paul Sokolovsky 8a32b1b38b uasyncio.core: Release 0.9. 2015-12-13 01:46:53 +02:00