From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id LAA25433 for caml-redist@pauillac.inria.fr; Sun, 7 May 2000 11:52:32 +0200 (MET DST) Resent-Message-Id: <200005070952.LAA25433@pauillac.inria.fr> 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 CAA10798 for ; Sat, 6 May 2000 02:09:14 +0200 (MET DST) Received: from miss.wu-wien.ac.at (miss.wu-wien.ac.at [137.208.107.17]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id CAA05094 for ; Sat, 6 May 2000 02:09:14 +0200 (MET DST) Received: (from mottl@localhost) by miss.wu-wien.ac.at (8.9.0/8.9.0) id CAA17778 for caml-list@inria.fr; Sat, 6 May 2000 02:09:13 +0200 (MET DST) From: Markus Mottl Message-Id: <200005060009.CAA17778@miss.wu-wien.ac.at> Subject: how to kill native code threads? To: caml-list@inria.fr (OCAML) Date: Sat, 6 May 2000 02:09:12 +0200 (MET DST) X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Resent-From: weis@pauillac.inria.fr Resent-Date: Sun, 7 May 2000 11:52:32 +0200 Resent-To: caml-redist@pauillac.inria.fr Hello, the documentation of the "Thread.kill" function says that it only works for bytecode-level threads. But how can I terminate native threads from outside? Say, for example, I want to run some state space search on several processors and create native threads that search a specific part of the search space. In the moment one returns with the solution I don't want the others continue running. One could stop them by sending them some kind of stop event, but the threads would have to check for this event at regular times, which is unelegant to program and costs time: if the thread checks too often, it will lose performance on the search; if it does so too seldom, we might have a considerable delay until it reacts to the termination event. Is there another (safe) way to do it? Best regards, Markus Mottl -- Markus Mottl, mottl@miss.wu-wien.ac.at, http://miss.wu-wien.ac.at/~mottl