[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Killing threads?
From: |
Andreas Rottmann |
Subject: |
Re: Killing threads? |
Date: |
06 Dec 2002 16:25:28 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
Daniel Berntsson <address@hidden> writes:
> I want to run a function, hopefully until it is finished, but not more
> than a certain amount of time. I intended to do this by running it in
> a thread, wait until it finishes or the time is up and then kill it if
> it is still running. But I can't seem to find how to kill a
> thread. Isn't that possible?
>
Its possible to cancel thread at the C level (at least with POSIX
threads). However, thread cancellation introduces several
difficulties, so I guess it's not implemented at the scheme level. You
probably must find a user-space way to tell the thread that it should
terminate. If ypu tell a bit about what the thread does, I could maybe
give you some hints how to implement this.
Regards, Andy
--
Andreas Rottmann | address@hidden | address@hidden |
address@hidden
http://www.8ung.at/rotty | GnuPG Key: http://www.8ung.at/rotty/gpg.asc
Fingerprint | DFB4 4EB4 78A4 5EEE 6219 F228 F92F CFC5 01FD 5B62
- Killing threads?, Daniel Berntsson, 2002/12/05
- Re: Killing threads?,
Andreas Rottmann <=