File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -191,6 +191,13 @@ async def testbench(ctx):
191191 which they were added. If two testbenches share state, or must manipulate the design in
192192 a coordinated way, they may rely on this execution order for correctness.
193193
194+ .. warning::
195+
196+ On Python 3.12 and earlier, async generators (:py:`async` functions that also
197+ :py:`yield`) are not cleaned up reliably when the simulator exits. To make sure context
198+ managers or :py:`finally` blocks inside async generators run properly, use Python 3.13
199+ or later.
200+
194201 Raises
195202 ------
196203 :exc:`RuntimeError`
@@ -248,6 +255,13 @@ async def process(ctx):
248255 :py:`await ctx.tick().sample(...)`. Such state is visible in a waveform viewer,
249256 simplifying debugging.
250257
258+ .. warning::
259+
260+ On Python 3.12 and earlier, async generators (:py:`async` functions that also
261+ :py:`yield`) are not cleaned up reliably when the simulator exits. To make sure context
262+ managers or :py:`finally` blocks inside async generators run properly, use Python 3.13
263+ or later.
264+
251265 Raises
252266 ------
253267 :exc:`RuntimeError`
You can’t perform that action at this time.
0 commit comments