Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Kinds of threads
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Benjamin Monate <Benjamin.Monate@l...>
Subject: Re: [Caml-list] Re: Kinds of threads
On Tue, 01 Oct 2002 09:51:08 +0200
Alessandro Baretta <alex@baretta.com> wrote:
> 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...
> 

Here is a small test to detect what kind of threads you have:

====================================================================
(* Compile with ocamlc -o threadtest -thread unix.cma threads.cma
threadtest.ml *) open Thread
let f () = while true do () done 
let i = create f () 
let _ = 
  try 
    kill i;
    print_string "Bytecode threads available\n"
  with Invalid_argument "Thread.kill: not implemented" 
      -> print_string "Native threads available\n"
====================================================================


Hope this helps.

-- 
| Benjamin Monate         | mailto:monate@lix.polytechnique.fr |
| LIX                     | http://www.lri.fr/~monate/         |
| École Polytechnique -  91128 Palaiseau Cedex - France        |
-------------------
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