Wykres commitów

24 Commity (12da3a81a6661d89f041efc57c525684ee5bf584)

Autor SHA1 Wiadomość Data
Daniel Mizyrycki 0f5d5cead7 uasyncio: Add minimum esp8266 support 2017-01-01 18:17:17 -08: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 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 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 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 c60ff8125b uasyncio.core: Avoid wrapping coroutines to lambdas for add_reader/writer.
add_reader/writer default behavior is to schedule "callback" on I/O
completion via call_soon(), there's no need to have lambda for that.
2015-12-12 00:12:19 +02:00
Paul Sokolovsky 460dd59b16 uasyncio.core: Don't pass any callback args to add_reader/add_writer.
Instead, capture all needed param in closure. Due do bug in MicroPython's
handling of default args to lambdas, helper function is used.
2015-12-09 00:40:04 +02:00
Paul Sokolovsky f9eed2340d uasyncio.core: Optimize for syscalls with single args.
Avoids allocating argument tuples.
2015-12-05 22:23:10 +02:00
Paul Sokolovsky db6c9fbaa9 uasyncio.core: Follow builtin "time" module rename to "utime". 2014-12-17 00:33:04 +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 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 9bb4f6b3b1 uasyncio.core: Implement async() and Task() for CPython compatibility. 2014-11-04 02:52:31 +02:00
Paul Sokolovsky cbaf0d3b57 uasyncio.core: Log only if __debug__==True (i.e. no optimization). 2014-10-26 00:20:45 +03:00
Damien George 0bb2f38aaf uasyncio: Use uheapq instead of heapq.
Conflicts:
	uasyncio/uasyncio/__init__.py
2014-10-24 01:16:15 +03:00
Paul Sokolovsky 4a884ef849 uasyncio: Split off uasyncio.core dist module. 2014-10-24 01:00:53 +03:00