Arc Forumnew | comments | leaders | submitlogin
1 point by zhtw 6106 days ago | link | parent

Oh, is that rather usual that scheme implementation uses green threads? If so, maybe I really shouldn't worry about it. I was concerned only because I thought it was expensive to have one system thread per connection.

Thanks for the link.



1 point by soegaard 6106 days ago | link

Most Scheme implementations doesn't use OS threads due to the cost of context switches. It is standard practice to use one thread for each connection.

See for example this very well written introduction to Systems Programming with PLT Scheme:

http://pre.plt-scheme.org/docs/html/more/index.html

-----

1 point by almkglor 6106 days ago | link

Maybe, I'm not sure. I couldn't grok the doc much. AFAIK mzscheme uses green threads only if it isn't compiled with "better" thread support.

As for cost per thread - no, I don't worry about it, it seems that mzscheme threads are reasonably light.

-----