caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Threads vs. Fork
@ 2005-06-11 17:09 Jonathan T Bryant
  2005-06-11 21:09 ` [Caml-list] " Eric Cooper
  0 siblings, 1 reply; 2+ messages in thread
From: Jonathan T Bryant @ 2005-06-11 17:09 UTC (permalink / raw)
  To: caml-list

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-06-12  3:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-11 17:09 Threads vs. Fork Jonathan T Bryant
2005-06-11 21:09 ` [Caml-list] " Eric Cooper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).