[plt-scheme] Calling virtual C++-functions from other MzScheme-threads

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Sat Nov 22 10:42:20 EST 2003

At Sat, 22 Nov 2003 07:37:07 -0800 (PST), Daniel "Kjøller" Skovenborg wrote:
> So the data is popped when shifting threads? 

Not popped --- just temporarily moved while other threads are active.

> Would it be harmful for MzScheme
> if I access the copy it keeps of 'a' (the data that is
> pushed on the stack when switching back to the
> thread)?

There's no way to find out where that copy is.

If you need to access an object from multiple Scheme threads, allocate
it in the heap instead of on the stack.

Matthew



Posted on the users mailing list.