From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id BAA02966; Wed, 4 Sep 2002 01:00:51 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id BAA02466 for ; Wed, 4 Sep 2002 01:00:50 +0200 (MET DST) Received: from mel-rto2.wanadoo.fr (smtp-out-2.wanadoo.fr [193.252.19.254]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g83N0nD02500 for ; Wed, 4 Sep 2002 01:00:49 +0200 (MET DST) Received: from mel-rta9.wanadoo.fr (193.252.19.69) by mel-rto2.wanadoo.fr (6.5.007) id 3D5392B600B03950 for caml-list@inria.fr; Wed, 4 Sep 2002 01:00:49 +0200 Received: from gogol (193.248.191.235) by mel-rta9.wanadoo.fr (6.5.007) id 3D6EE83C002A2AD6 for caml-list@inria.fr; Wed, 4 Sep 2002 01:00:49 +0200 Received: from berke by gogol with local (Exim 3.35 #1 (Debian)) id 17mMhY-000085-00 for ; Wed, 04 Sep 2002 01:03:16 +0200 Date: Wed, 4 Sep 2002 01:03:14 +0200 From: Berke Durak To: caml-list@inria.fr Subject: [Caml-list] Native threads under Debian 3.0r0 Message-ID: <20020903230314.GA311@gogol> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hello everybody, I'm having severe problems with native threads. Not only I can't get them to work with the Graphics module, I can't get them to work at all. I'm using a fresh Debian 3.0r0. I've recompiled Ocaml 3.06 with '-with-pthread' option. Shouldn't the following code $ cat toto.ml open Thread let _ = let code1 () = let x = ref 0 in while true do incr x; Printf.printf "alpha %d\n" !x; flush stdout done in let thread1 = Thread.create code1 () in while true do () done compiled with $ ocamlopt.opt -thread unix.cmxa threads.cmxa toto.ml -o toto and run as $ ./toto give me something like alpha 0 alpha 1 alpha 2 alpha 3 alpha 4 alpha 5 alpha 6 ... ? Instead, the program doesn't output anything, and when I hit Ctrl-C, it leaves some processes running, which can only be killed with SIGKILL. The program works when compiled as bytecode. System info : $ uname -a Linux gogol 2.4.18 #1 Thu Aug 22 20:42:28 CEST 2002 i586 unknown $ ls -l /lib/libpthread* -rw-r--r-- 1 root root 102172 Apr 28 11:57 /lib/libpthread-0.9.so However, even in bytecode, when I use the Graphics module, some subprocesses refuse to die when I interrupt the main program. Any clues ? Thanks very much. -- Berke Durak ------------------- 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