From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id KAA29450; Thu, 20 Nov 2003 10:28:00 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id KAA29104 for ; Thu, 20 Nov 2003 10:27:59 +0100 (MET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id hAK9RS113726; Thu, 20 Nov 2003 10:27:28 +0100 (MET) Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id KAA29798; Thu, 20 Nov 2003 10:27:28 +0100 (MET) Date: Thu, 20 Nov 2003 10:27:28 +0100 From: Xavier Leroy To: Richard Jones Cc: Caml Mailing List Subject: Re: [Caml-list] Need advice for a mobile application server Message-ID: <20031120102727.A28533@pauillac.inria.fr> References: <200311192003.37039.exa@kablonet.com.tr> <1069306474.24578.76.camel@pelican> <20031120091315.GA23449@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <20031120091315.GA23449@redhat.com>; from rich@annexia.org on Thu, Nov 20, 2003 at 09:13:15AM +0000 X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 posix:01 quirks:01 posix:01 threads:01 implemented:01 threads:01 kernel:01 ocaml:01 ocaml:01 off-topic:01 feasible:01 thread:02 thread:02 computations:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk This is getting off-topic, but: > [1] Of course the original LinuxThreads being written by Xavier Leroy, > so I wouldn't want to say it was broken ... You can safely say LinuxThreads is slightly borken, in that lack of thread support in the Linux kernel (until recently) prevented full compliance with the POSIX standard. These quirks affected some fairly obscure corners of the POSIX spec, though. In particular, the earlier comment that "LinuxThreads creates all threads detached" is not accurate: thread creation and joining was implemented correctly. Back to the original question: writing a multithreaded server in OCaml is definitely feasible. The only limitation to be aware of is that OCaml threads do not offer parallelism, just concurrent execution. What this means is that if there are several processors on your machine, only one can execute OCaml code at any time, but other threads (and therefore possibly other processors) can do I/O or C computations in parallel. - Xavier Leroy ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners