<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div>Hi Marc,</div><div><br></div><div>I was frustrated trying to run emscripten powered gambit-c program on web browser.</div><div><br></div><div>The attachment gsi.scm is my program, there's an explicitly main function delcare here to make sure the js code was completely loaded before calling gambit-c _setup() function.</div><div> I put ##repl-debug-main in primordial thread and call _setup() in main to bring up the whole gambit-c system. I use the attachment my-build-script to generate the ultimate gsi.js file.</div><div> I issue echo "(load \"fib\") (pp (time (fib 20)))" | /usr/bin/time node gsi.js, and everything is fine. Unfortunately gsi.js was stuck in a web browser environment. </div><div><br></div><div>Through some experiment, I found the _setup() function never return, the comment in the code said it will create a service thread which executes the rest of the program. </div><div>I think it is the reason why it hung the web browser. I also did another experiment, explicitly make the primordial thread exit. said issue echo "(load \"fib\") (pp (time (fib 20))) ,q" | /usr/bin/time node gsi.js, but the web_trampoline function throw an exception, I trace the exception was threw from macro-run-queue of ##next-heartbeat-interval function</div><div><br></div><div>The reason I don't want to use recent gambit to build with emscripten is I am afraid the ultimate js file would be tremendious large. Looking forward your reply and help</div><div><br></div><div><br></div><div><br></div><div><br></div></div>