[plt-scheme] Using Scheme_Object * from another thread
I thought Hans Boehms GC was thread safe. Are you sure?
Hans
Adam Wick schreef:
>
> You will see intermittent failures in the 3m variants. I don't know the
> non-3m code nearly as well, but I suspect you will see failures there,
> as well.
>
> In order to do this safely, you'd need to (a) completely block the Scheme
> thread from allocating while your OS thread was running, (b) (most
> likely)
> force a garbage collection immediately on starting the OS thread and
> (c) make
> sure your OS thread isn't allocating enough memory such that it'll
> trigger a
> collection after the collection in (b). I would suspect that enforcing
> these
> would cost notably more than the savings you'll get from multithreading.
>
>
>
> -Adam
>