Skip to content

Commit b1d635f

Browse files
agattidpgeorge
authored andcommitted
docs/reference/speed_python: Update native emitter limitations.
This commit updates the listed limitations of the native emitter in the documentation related to how to increase speed of python code. Context managers are supported, as in functions marked as native can use the `with` statement in regular code. Generators can be used in native functions both on the emitting (ie. `yield <whatever>`) and on the receiving end. Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
1 parent e0beace commit b1d635f

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

docs/reference/speed_python.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,12 +243,10 @@ no adaptation (but see below). It is invoked by means of a function decorator:
243243
244244
There are certain limitations in the current implementation of the native code emitter.
245245

246-
* Context managers are not supported (the ``with`` statement).
247-
* Generators are not supported.
248246
* If ``raise`` is used an argument must be supplied.
249247
* The background scheduler (see `micropython.schedule`) is not run during
250248
execution of native code.
251-
* On targets with thrteading and the GIL, the GIL is not released during
249+
* On targets with threading and the GIL, the GIL is not released during
252250
execution of native code.
253251

254252
To mitigate the last two points, long running native functions should call

0 commit comments

Comments
 (0)