sunet-devel
[Top] [All Lists]

[Sunet-devel] Re: sunet: seval do/timeout problem (i want to kill a thr

To: mmc@maruska.dyndns.org (Michal Maru¹ka)
Subject: [Sunet-devel] Re: sunet: seval do/timeout problem (i want to kill a thread)
From: Martin Gasbichler <gasbichl@informatik.uni-tuebingen.de>
Date: Wed Apr 3 12:05:06 2002
Cc: sunet-devel@lists.sourceforge.net, scsh-news@zurich.ai.mit.edu
List-id: <sunet-devel.lists.sourceforge.net>
Sender: sunet-devel-admin@lists.sourceforge.net
>>>>> "Michal" == Michal Maru¹ka <mmc@maruska.dyndns.org> writes:

Michal> i have been looking at SEVAL handler in sunet. It works only if i 
remove the
Michal> |        (do/timeout 10

Michal> Well, i removed it and making some other changes it started to work { i 
wanted
Michal> to eval (+ 2 2) }.


Michal> However I would like to implement   do/timeout  with threads. But how 
to kill
Michal> one ?

You can kill a thread with the procedure KILL-THREAD! from the
structure THREADS-INTERNAL. However, this is dangerous as the thread
may hold resources which are not given back when the thread is
killed. I'm not sure if there exists plans for a cleaner way to
terminate threads in S48.


Michal> BTW: i am new to threads. Can someone confirm that the s48 
implementation is
>> good---fast (under linux)?   Is it possible to have 2 emacs sessions with 2
>> threads of the same process ?

The thread implementation of s48 is built in user-space and thereby
completely independent of the OS. It is also extremely fast in terms of
thread creation and context switching.


-- 
Martin


<Prev in Thread] Current Thread [Next in Thread>