[plt-scheme] capturing output from different threads

From: Chongkai Zhu (czhu at cs.utah.edu)
Date: Wed Mar 5 09:51:05 EST 2008

Dave Griffiths wrote:
>>> Also maybe related, I find that calling scheme_eval_string_all on the
>>> interpreter causes all threads to get run, calling scheme_check_threads
>>> doesnt seem to make any difference.
>> I didn't get what you mean here. But that's looks like the correct
>> behaver.
> Ah, I initially thought you needed to call scheme_check_threads to get
> non-main thread to run at all - on reading the docs again I see it's to
> wait for all threads to finish. I was confused.

Yes, you do need to call scheme_check_threads to get non-main thread to 
run. But if your main thread calls a "scheme_eval_string_all", or during 
a call to (nearly) anything provided by mzscheme, they will do the yield.

In conclusion, scheme_check_threads is only needed when you want 
non-main Scheme thread to run when your main thread is running your OWN 
C code.


> cheers,
> dave

Posted on the users mailing list.