[plt-scheme] Thread support

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Mon Jan 10 14:29:13 EST 2005

At Mon, 10 Jan 2005 13:16:20 -0600, Blake McBride wrote:
> The chapter 7 note makes me think cooperative threads are used at
> least in some cases (on those implementations where the OS doesn't
> support native threads) but possibly not in all. The note in chapter
> 1 makes me think true OS pre-emptive threads are supported where
> available.
> I find this description ambiguous and it has caused me many, many hours
> of wasted work in prior releases.  I understand MzScheme 103 now but am
> unclear about 299.xx.  Can't the docs be updated to be clear?

I'll work on it.

Perhaps one reason the InsideMz documentation is confusing is because
it talks about stand-alone MzScheme and embedded MzScheme at the same

> Are true (pre-emptive,OS level) threads ever supported by MzScheme?

OS-level threads are never used to implement MzScheme threads. In 103,
OS threads could be used to implement MzScheme threads, but we gave up
on that architecture.

In stand-alone MzScheme/MrEd under Unix, there is always just one
OS-level thread. Under Windows and OS X, there are a some internal
OS-level threads (e.g., a timer thread in Windows) that are never
exposed by the API.

MzScheme can be embedded in an application that uses multiple OS
threads, as long as the application only accesses MzScheme through one
particular OS thread.

> Are all implementations done with portable, internally cooperative, single
> OS thread implementations?



Posted on the users mailing list.