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 JAA00727; Tue, 1 Oct 2002 09:41:19 +0200 (MET DST) 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 JAA00758 for ; Tue, 1 Oct 2002 09:41:18 +0200 (MET DST) Received: from athlon.baretta.com (host254-68.pool80116.interbusiness.it [80.116.68.254]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g917fH502246 for ; Tue, 1 Oct 2002 09:41:17 +0200 (MET DST) Received: from baretta.com (localhost.localdomain [127.0.0.1]) by athlon.baretta.com (Postfix) with ESMTP id 4E90827244; Tue, 1 Oct 2002 09:51:08 +0200 (CEST) Message-ID: <3D9953EC.3030604@baretta.com> Date: Tue, 01 Oct 2002 09:51:08 +0200 From: Alessandro Baretta Organization: Baretta srl -- www.baretta.com User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826 X-Accept-Language: it, en MIME-Version: 1.0 To: =?ISO-8859-1?Q?Micha=EBl_Gr=FCnewald?= Cc: caml-list@inria.fr Subject: Re: [Caml-list] Re: Kinds of threads References: <3D98559D.2060100@baretta.com> <87wup3ecb2.fsf@ketanu.dyndns.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Michaël Grünewald wrote: > Alessandro Baretta writes: > > >>The docs say that there are two kinds of threads in O'Caml: Ocaml >>bytecode threads and POSIX threads, and that it is possible to select >>which implementation to use at compiler build time. Two questions: >>first, what is the implementation chosen in the ocaml RPM distribution; >>second, why must one choose one implementation at compiler build time? >>Why not use a compiler switch such as --posix-threads as opposed to >>--caml-threads? > > > Depending of the platform, POSIX threads may not or badly > available. Emulation can be set up, either by coercing existing thread > capabilities to the POSIX interface, or by implementing a POSIX thread > library, using processes and interprocesses communications to do the job (i > have been told it was the way with linux, please confirm or infirm it). I don't really know what you mean by "emulation", but, yes, LinuxThreads is POSIX-compliant extension to glibc which instantiates kernel-level processes. > Maybe the switch is here because it is better to use POSIX threads when they > are well supported by the system (e.g. BSDs); but the caml thread emulation > may give better results in (some) other cases. Caml threads are probably the only way to go on Windows, since the Win32 API is not POSIX compliant. Still, this does not answer my question: what is the threading style chosen for the official RPM distribution of O'Caml? Let me see if I can figure this out by myself... Alex ------------------- 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