[gambit-list] Native threading with C++?
Alex Queiroz
asandroq at gmail.com
Thu Mar 22 06:41:30 EDT 2012
Hallo,
On Thu, Mar 22, 2012 at 11:28 AM, Patrick Bene <pubbybene at gmail.com> wrote:
> I'm interested in using multithreaded C++ code along with Gambit. From what I
> understand, Gambit does not support native multithreading, but what about
> the FFI? Am I allowed to have multiple C++ threads running alongside Gambit?
>
> Additionally (in case I missed something), is there anyway to get Gambit itself
> running in multiple native threads? I don't need full-blown functionality, but
> I'll take anything that's availible.
>
Some ideas:
- Start more than one Gambit process and synchronise them using IPC,
like shared memory or a local UNIX socket. Each Gambit process can run
thousands of green threads (they will all use 1 CPU).
- Add a C/C++ function to Gambit to somehow start and talk to the
other OS threads. In this case the other threads's code cannot run
Gambit code, because it is not thread-safe. This is better if the
tasks are simple or you can find C/C++ libraries to help.
Cheers,
--
-alex
http://www.artisancoder.com/
More information about the Gambit-list
mailing list