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=1.0 required=5.0 tests=AWL,SPF_FAIL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id B01E7BC6B for ; Wed, 19 Sep 2007 22:09:38 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAIAe8UbAXQImn2dsb2JhbACOEgIBAQcEBgcIGA X-IronPort-AV: E=Sophos;i="4.20,275,1186351200"; d="scan'208";a="2934800" Received: from discorde.inria.fr ([192.93.2.38]) by mail3-smtp-sop.national.inria.fr with ESMTP; 19 Sep 2007 22:10:55 +0200 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l8JKA7O0011416 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Wed, 19 Sep 2007 22:10:12 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAADMf8UZQW+UCn2dsb2JhbACOEgIBAQcEBgcIGA X-IronPort-AV: E=Sophos;i="4.20,275,1186351200"; d="scan'208";a="1428436" Received: from main.gmane.org (HELO ciao.gmane.org) ([80.91.229.2]) by mail2-smtp-roc.national.inria.fr with ESMTP; 19 Sep 2007 22:10:50 +0200 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1IY5sD-0006fY-Oa for caml-list@inria.fr; Wed, 19 Sep 2007 22:10:13 +0200 Received: from ivr94-8-88-162-26-239.fbx.proxad.net ([88.162.26.239]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 19 Sep 2007 22:10:13 +0200 Received: from li by ivr94-8-88-162-26-239.fbx.proxad.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 19 Sep 2007 22:10:13 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: caml-list@inria.fr From: Zheng Li Subject: Re: [ANN] coThreads 0.10 Date: Wed, 19 Sep 2007 22:10:42 +0200 Message-ID: <877imm2z7h.fsf@pps.jussieu.fr> References: <87lkb5fe3f.fsf@pps.jussieu.fr> <87sl5d8cgd.fsf@pps.jussieu.fr> <46F174D9.5060900@ujf-grenoble.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: ivr94-8-88-162-26-239.fbx.proxad.net User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux) Cancel-Lock: sha1:xtXMZEl8ZlWQjXaerIunR1/X4fk= Sender: news X-Miltered: at discorde with ID 46F1821F.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; lablgtk:01 usr:01 lib:01 ocaml:01 cmi:01 usr:01 lib:01 ocaml:01 lablgtk:01 gtkthread:01 cmi:01 ocaml's:01 unify:01 0.10:98 threads:01 Hi, Vu Ngoc San writes: > this looks like something I'd be very happy to use. Have you tried compiling > lablgtk2 with it ? > > (so that I could get rid of the following:) > [ > The files /usr/lib/ocaml/3.10.0/process/thread.cmi > and /usr/lib/ocaml/3.10.0/lablgtk2/gtkThread.cmi > make inconsistent assumptions over interface Thread > ] I'm not sure what you're trying to do, but the reason of error seems obvious: lablgtk2 seems to have been compiled with the Thread module of system threads or VM thread (both come with OCaml's standard distribution), while you're linking them with other modules compiled against the Thread module of process engine. The Thread module interfaces from the three engines differ with each other! Note that this is not the problem from coThreads, it's a problem of standard Threads library: - The Thread interfaces of system threads and VM threads coming with the standard distribution *already* differ with each other, so that the objects compiled with system Thread won't be able to mix with objects compiled with VM thread, vice versa. (The problem is the same as in your case) - We have no way to unify the three of them without modifying the files from original distribution, which is exactly what we manage to avoid. On the other hand, the Cothread module (a super set of the Thread interface) is provided to achieve object-level compatibility, so that the objects compiled with different engines can mix. All other modules from Threads and coThreads, e.g. Mutex, Event, don't have this problem. You'd like to read the compatibility page for more explanation: http://cothreads.sourceforge.net/doc/compatibility Regards -- Zheng Li http://www.pps.jussieu.fr/~li