[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2005-06-11 (17:09) |
From: | Jonathan T Bryant <jtbryant@v...> |
Subject: | Threads vs. Fork |
The reason I asked about the threads is because I need the shared memeory, but I also need to use multiple processors. Essentially, I'm writing a mini-database. There's a shared data structure (a tree of some description) and a bunch of workers that perform lookups. Every time there's an update to the tree, all of the workers need to be blocked until the update is completed (pretty standard stuff). I can do this with fork if I can have shared memory, or I can do this with threads if I can use multiple processors. Apparenly, neither option exists in OCaml. Any suggestions on how to resolve this? Does somebody have an extended Unix API that includes things like shared memory (shmget(), shmat(), etc...) --Jonathan