[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: thread cancellation, take 2
From: |
Ludovic Courtès |
Subject: |
Re: thread cancellation, take 2 |
Date: |
Wed, 26 Sep 2007 06:03:15 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) |
Hi,
"Julian Graham" <address@hidden> writes:
> Fair enough, re: closures. But why should callers outside the current
> thread be able to access that thread's cleanup handler procedure?
> Maybe this isn't a realistic issue, but you could use this to "inject"
> arbitrary code into a separate thread by setting the cleanup procedure
> and immediately canceling the thread. Why not treat the handler as
> thread-specific data?
Anyway, as long as you have a reference to an object (including a thread
object), you can use the relevant procedures to mutate it. For
instance, if my code passes a list to yours, I have no guarantee that
your code won't call `set-car!' on it.
Just to say that hiding the data doesn't solve this authorization
problem, it just makes it less visible.
Beside, it may be useful in some cases to assign a thread finalizer from
outside the thread itself.
Thanks,
Ludovic.
- thread cancellation, take 2, Julian Graham, 2007/09/20
- Re: thread cancellation, take 2, Ludovic Courtès, 2007/09/20
- Re: thread cancellation, take 2, Julian Graham, 2007/09/20
- Re: thread cancellation, take 2, Julian Graham, 2007/09/23
- Re: thread cancellation, take 2, Ludovic Courtès, 2007/09/23
- Re: thread cancellation, take 2, Julian Graham, 2007/09/23
- Re: thread cancellation, take 2, Ludovic Courtès, 2007/09/24
- Re: thread cancellation, take 2, Julian Graham, 2007/09/24
- Re: thread cancellation, take 2, Julian Graham, 2007/09/24
- Re: thread cancellation, take 2,
Ludovic Courtès <=
- Re: thread cancellation, take 2, Julian Graham, 2007/09/26