Version française
Home     About     Download     Resources     Contact us    
Browse thread
crash under macos x but not win32
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jacques Garrigue <garrigue@m...>
Subject: Re: [Caml-list] crash under macos x but not win32
From: skaller <skaller@users.sourceforge.net>
> On Tue, 2007-04-10 at 10:07 +0900, Jacques Garrigue wrote:
> > From: "Jeffrey Loren Shaw" <shawjef3@msu.edu>
> 
> >  Rather, it appears not
> > to be reentrant (or rather not callable from several threads.) By the
> > way I am surprised you have no problem under Win32, which often has
> > reentrance problems too.
> 
> Tcl is re-entant since version 8. Tk is not and never will be.

Actually this is not the problem here, as ocaml does not need full
reentrance (ability to call the library after preemption), but just a
weaker form (ability to call the library from any thread, after
control was given back to the ocaml process). This is because only one
ocaml thread runs at any time, and only when the control is on the
caml side. So I believe the problem is at a lower level, either in the
system's graphics libraries (I'm no OSX specialist), or in the
specifics of the Tk/Aqua implementation. For instance, on windows, GDI
functions must always be called from the same thread or you get an
error.

Jacques Garrigue