Version française
Home     About     Download     Resources     Contact us    
Browse thread
[ANN] coThreads 0.10
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Zheng Li <li@p...>
Subject: Re: [ANN] coThreads 0.10

Hi,

Vu Ngoc San <san.vu-ngoc@ujf-grenoble.fr> 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