@@ -127,15 +127,18 @@ async def bar(lock):
127
127
While the coro ` bar ` is accessing the resource, other coros will pause at the
128
128
` async with lock ` statement until the context manager in ` bar() ` is complete.
129
129
130
- Note that MicroPython has a bug in its implementation of asynchronous context
131
- managers: a ` return ` statement should not be issued in the ` async with ` block.
132
- See note at end of [ this section] ( ./TUTORIAL.md#43-asynchronous-context-managers ) .
130
+ Note that MicroPython had a bug in its implementation of asynchronous context
131
+ managers. This is fixed: if you build from source there is no problem. Alas the
132
+ fix was too late for release build V1.9.4. If using that build a ` return `
133
+ statement should not be issued in the ` async with ` block. See note at end of
134
+ [ this section] ( ./TUTORIAL.md#43-asynchronous-context-managers ) .
133
135
134
136
### 3.2.1 Definition
135
137
136
138
Constructor: Optional argument ` delay_ms ` default 0. Sets a delay between
137
139
attempts to acquire the lock. In applications with coros needing frequent
138
- scheduling a nonzero value will facilitate this at the expense of latency.
140
+ scheduling a nonzero value will reduce the ` Lock ` object's CPU overhead at the
141
+ expense of latency.
139
142
Methods:
140
143
141
144
* ` locked ` No args. Returns ` True ` if locked.
@@ -190,10 +193,10 @@ Example of this are in `event_test` and `ack_test` in asyntest.py.
190
193
191
194
### 3.3.1 Definition
192
195
193
- Constructor: takes one optional boolean argument, defaulting False .
194
- * ` lp ` If ` True ` and the experimental low priority core.py is installed,
195
- low priority scheduling will be used while awaiting the event. If the standard
196
- version of uasyncio is installed the arg will have no effect .
196
+ Constructor: takes one optional integer argument.
197
+ * ` delay_ms ` default 0. While awaiting an event an internal flag is repeatedly
198
+ polled. Setting a finite polling interval reduces the task's CPU overhead at
199
+ the expense of increased latency .
197
200
198
201
Synchronous Methods:
199
202
* ` set ` Initiates the event. Optional arg ` data ` : may be of any type,
0 commit comments