how to kill native code threads?

From: Markus Mottl (mottl@miss.wu-wien.ac.at)
Date: Sat May 06 2000 - 02:09:12 MET DST

  • Next message: Benjamin C. Pierce: "Re: Book in english"

    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
    



    This archive was generated by hypermail 2b29 : Sun May 07 2000 - 11:58:48 MET DST