Path: utzoo!attcan!uunet!mcsun!ukc!pyrltd!root44!praxis!graeme From: graeme@praxis.co.uk (Graeme Cutler) Newsgroups: comp.os.os2.misc Subject: OS/2 Threads...... Message-ID: <5578@newton.praxis.co.uk> Date: 12 Dec 90 14:07:27 GMT Sender: graeme@praxis.co.uk Organization: Praxis, Bath, U.K. Lines: 28 ----- News saved at 10 Dec 90 14:55:41 GMT Is it possible to kill off threads from inside a C program? Is it even a sensible question to ask? ;-) I know that processes get started using DosExecPgm and that a process can be terminated using DosKillProcess. A thread can be created using DosCreateThread or _beginthread, but there seems be no mention of a _killthread just suspension. I had tentatively toyed with the idea of minimising the number of processes our application would have by using threads to perform specific actions. Unfortunately I have a problem when using Netbios. If a thread is dedicated to sending data using Netbios and the token ring breaks the send request just hangs there (somewhere in Netbios). The application will detect a failed lan by sending messages to itself with the receive timing out, a number of time outs means the ring is dead ;-) We then thought that it may be sensible to kill off the thread and recreate another there by following a standard recovery process and thus able to say the message we were sending never got there. I know we could uses more processes but that would just increase the inter process communication headache we already have. Does anyone have any advice or experience especially on Netbios that might be useful?