[gambit-list] Real Threads

lowly coder lowlycoder at huoyanjinjing.com
Mon Nov 9 05:00:11 EST 2009


The correct answer is probably "try it"; but I just want to see if
there are non-deterministic gotchas I need to be aware of.

I have the following setup in mind:

I have C++ ffi that create threads. Real Linux OS threads.

So I startup gambit gsi (in OS thread 0) ; it calls the C++ ffi code;
creating linus OS thread (OS Thread 1) in the same address space.

OS Thread 1 never makes any calls to gambit. Thread 0 & Thread 1 do
not have any race conditions in C++ land.

Are there any other gotchas I should worry about, or am I relatively safe?

Months ago, I was complaining about gc pauses; well now, I've moved
rendering entirely into C++ land with it's own thread and all that.
Now, I'm thinking of bringing gambit back in.

In particular, I'm planning on using the pthreads library.

Thanks!



More information about the Gambit-list mailing list