We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e4ce63 commit c6bf140Copy full SHA for c6bf140
python/pythonmonkey/cli/pmjs.py
@@ -5,6 +5,7 @@
5
6
import sys, os, signal, getopt
7
import readline
8
+import asyncio
9
import pythonmonkey as pm
10
from pythonmonkey.lib import pmdb
11
@@ -356,8 +357,11 @@ def main():
356
357
assert False, "unhandled option"
358
359
if (len(args) > 0):
- globalInitModule.patchGlobalRequire()
360
- pm.runProgramModule(args[0], args, requirePath)
+ async def runJS():
361
+ globalInitModule.patchGlobalRequire()
362
+ pm.runProgramModule(args[0], args, requirePath)
363
+ await pm.wait() # blocks until all asynchronous calls finish
364
+ asyncio.run(runJS())
365
elif (enterRepl or forceRepl):
366
globalInitModule.initReplLibs()
367
repl()
0 commit comments