From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=2.0 required=5.0 tests=AWL,DNS_FROM_RFC_WHOIS, SPF_SOFTFAIL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id AC859BB83 for ; Wed, 13 Sep 2006 16:59:17 +0200 (CEST) Received: from mail-red.research.att.com (mail-red.research.att.com [192.20.225.110]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id k8DExGGu029027 for ; Wed, 13 Sep 2006 16:59:17 +0200 Received: from [135.207.28.68] (fpdhcp068.research.att.com [135.207.28.68]) by bigmail.research.att.com (8.13.3+Sun/8.11.6) with ESMTP id k8DExGt7016234; Wed, 13 Sep 2006 10:59:16 -0400 (EDT) Message-ID: <45081CC0.8010004@research.att.com> Date: Wed, 13 Sep 2006 10:59:12 -0400 From: Trevor Jim User-Agent: Thunderbird 1.5.0.5 (X11/20060728) MIME-Version: 1.0 To: Jonathan Roewen Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] effect of -thread with ocamlc/ocamlopt -c References: <4506E954.8080207@research.att.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at discorde with ID 45081CC5.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; -thread:01 ocamlc:01 ocamlopt:01 pervasives:01 -thread:01 threads:01 -trevor:01 pervasives:01 internals:01 threading:01 wrote:01 caml-list:01 functions:01 linking:02 confused:03 Well, I'm still confused. Consider that a bunch of the standard libraries use Pervasives, but I can see that the standard library is not compiled with -thread. So clearly we are meant to use the standard library compiled without -thread, with threads.cm[x]a. So, I still don't understand when I can combine code compiled without -thread with code compiled with -thread. -Trevor Jonathan Roewen wrote: > Oh wait, I'm sorry. Yes, there is good reason: it uses a different > version of Pervasives internals. > > Depending on when linking is done for each part, you may end up with > conflicting implementations of Pervasives in your final program: so > [IO] operations that can block will block whole program instead of > running thread blocking, and another thread running instead. > > So maybe if it uses no IO, and no threading functions, it might be > okay -- there are no guarantees when you do these sorts of things (: > > Jonathan