@@ -4,23 +4,21 @@ This document describes a "priority" version of uasyncio. Its purpose is to
4
4
provide a simple priority mechanism to facilitate the design of applications
5
5
with improved millisecond-level timing accuracy and reduced scheduling latency.
6
6
7
- V0.2 Dec 2017 . A single module designed to work with the official ` uasyncio `
8
- library. This requires uasyncio.core V1.7 which was released on 16th Dec 2017,
9
- with firmware of that date or later. It does not yet support ` uasyncio ` V2.0 .
7
+ V0.3 Feb 2018 . A single module designed to work with the official ` uasyncio `
8
+ library. This requires ` uasyncio ` V2.0 which requires firmware dated
9
+ 22nd Feb 2018 or later.
10
10
11
11
** API CHANGES**
12
- The API has been changed to simplify the code and to improve consistency.
13
- 1 . ` call_after_ms ` Args have changed to match other methods.
14
- 2 . ` get_event_loop ` now only takes two args - setting the maximum overdue time
15
- must be done via the ` max_overdue_ms ` method.
12
+ V2.0 of ` uasyncio ` changed the arguments to ` get_event_loop ` so this version
13
+ has corresponding changes. See [ section 3] ( ./FASTPOLL.md#3-a-solution ) .
16
14
17
15
###### [ Main README] ( ./README.md )
18
16
19
17
# Contents
20
18
21
19
1 . [ Installation] ( ./FASTPOLL.md#1-installation )
22
20
23
- 1.1 [ Benchmarks] ( ./FASTPOLL.md#11-benchmarks )
21
+ 1.1 [ Benchmarks] ( ./FASTPOLL.md#11-benchmarks ) Benchmark and demo programs.
24
22
25
23
2 . [ Rationale] ( ./FASTPOLL.md#2-rationale )
26
24
@@ -51,29 +49,34 @@ The API has been changed to simplify the code and to improve consistency.
51
49
# 1. Installation
52
50
53
51
Install and test uasyncio on the target hardware. Copy ` asyncio_priority.py `
54
- to the target.
52
+ to the target. Users of previous versions should update any of the benchmark
53
+ programs which are to be run.
55
54
56
55
In MicroPython 1.9 ` uasyncio ` was implemented as a frozen module on the
57
- ESP8266. The ` asyncio_priority.py ` module may be put in the filesystem or
58
- compiled as frozen bytecode. See [ ESP Platforms] ( ./FASTPOLL.md#6-esp-platforms )
59
- for general comments on the suitability of ESP platforms for systems requiring
60
- fast response.
56
+ ESP8266. This version is not compatible with ` asyncio_priority.py ` . Given the
57
+ limited resources of the ESP8266 ` uasyncio ` and ` uasyncio_priority ` should be
58
+ implemented as frozen bytecode. See
59
+ [ ESP Platforms] ( ./FASTPOLL.md#6-esp-platforms ) for general comments on the
60
+ suitability of ESP platforms for systems requiring fast response.
61
61
62
62
## 1.1 Benchmarks
63
63
64
64
The benchmarks directory contains files demonstrating the performance gains
65
65
offered by prioritisation. They also offer illustrations of the use of these
66
66
features. Documentation is in the code.
67
67
68
- * latency.py Shows the effect on latency with and without low priority usage.
69
- * timing.py Shows the effect on timing with and without low priority usage.
70
- * rate.py Shows the frequency with which the official uasyncio schedules
71
- minimal coroutines (coros).
72
- * rate_p.py As above, but measures the overhead of the priority extension.
73
- * call_lp.py Demos low priority callbacks.
74
- * overdue.py Demo of maximum overdue feature.
75
- * priority.py Demo of high priority coro.
76
- * priority_test.py Cancellation of low priority coros.
68
+ * ` benchmarks/latency.py ` Shows the effect on latency with and without low
69
+ priority usage.
70
+ * ` benchmarks/timing.py ` Shows the effect on timing with and without low
71
+ priority usage.
72
+ * ``benchmarks/rate.py` Shows the frequency with which the official uasyncio
73
+ schedules minimal coroutines (coros).
74
+ * ` benchmarks/rate_p.py ` As above, but measures the overhead of the priority
75
+ extension.
76
+ * ` benchmarks/call_lp.py ` Demos low priority callbacks.
77
+ * ` benchmarks/overdue.py ` Demo of maximum overdue feature.
78
+ * ` benchmarks/priority.py ` Demo of high priority coro.
79
+ * ` priority_test.py ` Cancellation of low priority coros.
77
80
78
81
With the exceptions of call_lp and priority.py, benchmarks can be run against
79
82
the official and priority versions of usayncio.
0 commit comments