[plt-scheme] State of Windows Multi-Threaded Garbage Collection

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Sun Apr 11 09:12:44 EDT 2004

> On one hand, Chapter 1 (Section 2) of Inside PLT MzScheme says:
> [...]
>
> On the other hand README.win32 from the gc source says:
> [...]
>
> Which seems to contradict the manual. What should I do?

Believe "Inside PLT MzScheme" if you use MzScheme and the Boehm GC as
compiled by the usualy makefiles and projects.

If you change the build process to #define GC_WIN32_THREAD, believe
README.win32.

> Also, will I have to keep all my scheme objects in some kind of global
> array, registered with scheme_register_static/extension_global?

Something like that, for objects that need to live across calls to the
worker thread.

If you just need to protect values that flow out of the worker thread
to other threads (for inspection by the other threads), then you might
use scheme_dont_gc_ptr() and scheme_gc_ptr_ok() --- which essentially
implement the array for you.

Matthew



Posted on the users mailing list.