summaryrefslogtreecommitdiff
path: root/tests/run-tests.py
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2023-06-24 17:19:05 +1000
committerDamien George <damien@micropython.org>2024-03-22 13:37:47 +1100
commit9b090603a04e69ec710e14f6c8bd93011516c5a1 (patch)
tree8c631d3aed4647f5bf9c40eddd6bafc863e33623 /tests/run-tests.py
parent39bd0b8a0a18d7bfc499acc7a11028da12f43edc (diff)
webassembly: Implement runPythonAsync() for top-level async code.
With this commit, `interpreter.runPythonAsync(code)` can now be used to run Python code that uses `await` at the top level. That will yield up to JavaScript and produce a thenable, which the JavaScript runtime can then resume. Also implemented is the ability for Python code to await on JavaScript promises/thenables. For example, outer JavaScript code can await on `runPythonAsync(code)` which then runs Python code that does `await js.fetch(url)`. The entire chain of calls will be suspended until the fetch completes. Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'tests/run-tests.py')
0 files changed, 0 insertions, 0 deletions