Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!mips!apple!voder!nsc!amdahl!rtech!ingres!seg From: seg@ingres.com (scott e garfinkle) Newsgroups: comp.os.os2.programmer Subject: Re: Killing threads Message-ID: <1991Jun12.164046.23365@ingres.Ingres.COM> Date: 12 Jun 91 16:40:45 GMT References: <1991Jun8.234338.8440@fwi.uva.nl> <1991Jun11.174431.21270@ingres.Ingres.COM> <1991Jun12.003757.24023@netcom.COM> Organization: Ask Computer Systems, Ingres Products Division Lines: 19 >>... It seems very likely, though, >>that, at some point before gerneral availability of 2.0, the IBM kernel >>group will make it possible for one thread to raise an exception in another >>thread. Then you will be able to kill off threads in a fairly orderly way. > >How will the threads be killed? Will there be a new system call, or >what? As I said, one way or another, you will be able to rais an excpetion in another thread. My assumption would be something like DosRaiseException with a second argument. By specifying the EH_NONCONTINUABLE flag and an appropriate exception number, you could make sure that the target thread dies. This way, you also give the target thread a chance to protect itself by registering an excpetion handler. Of course, the whole excpetion mechanism is not real intuitive, but it's better than nothing. It bears pointing out that I am in no way affiliated with IBM, and that any statements made here are sheer speculation. -scott e. garfinkle