Thread-killing, round 666 (was Re: Lisp mentality vs. Python mentality)

Vsevolod vseloved at gmail.com
Mon Apr 27 07:27:09 EDT 2009


On Apr 27, 2:17 pm, "Richard Brodie" <R.Bro... at rl.ac.uk> wrote:
> "Vsevolod" <vselo... at gmail.com> wrote in message
>
> news:42cebb2b-0361-416c-8932-9371da50a1ec at y6g2000prf.googlegroups.com...
>
> > There's a common unification library -- bordeaux-threads --
> > that abstracts away implementation specifics. It's API includes
> > the function destroy-thread.
>
> Which is deprecated, like the Java one. It's not hard to provide
> a kill thread call, if you don't mind it having undefined semantics.

"This should be used with caution: it is implementation-defined
whether the thread runs cleanup forms or releases its locks first."
This doesn't mean deprecated. It means: implementation-dependent. For
example in SBCL: "Terminate the thread identified by thread, by
causing it to run sb-ext:quit - the usual cleanup forms will be
evaluated". And it works fine.

Best regards,
Vsevolod



More information about the Python-list mailing list