[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-kawa] [bug #14072] inconsistent binding behavior for threads
From: |
Per Bothner |
Subject: |
[Bug-kawa] [bug #14072] inconsistent binding behavior for threads |
Date: |
Wed, 10 Aug 2005 07:12:46 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.8b3) Gecko/20050712 Firefox/1.0+ |
Update of bug #14072 (project kawa):
Status: None => Invalid
Assigned to: None => bothner
Open/Closed: Open => Closed
_______________________________________________________
Follow-up Comment #1:
I don't think this is a bug.
The issue is how a thread inherits the evironment from a parent thread. This
is only supported when creating a Future. Generalizing Environment
inheritance for arbitrary threads is difficult. The problem is how do you
get the Environment of a parent thread? Currently we use a ThreadLocal to
map from the current thread to its CallContext and hence to its Environment,
but you cannot get the ThreadLocal binding for any other thread.
It may be possible to use a a HashTable or similar to map a Thread to its
Environment, and thus get the parent thread's Environment, but garbage
collection makes this difficult. (Using a WeakHashMap is an option, but only
correct the Environemnt when the Thread is collected; not when the thread
finishes.)
An API to allow the programmer to explicitly request that a child thread
inherit it's parents Environment is desirable; you could submit a new "bug"
as an enhancement request?
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=14072>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/