What's wrong with D's templates?
Walter Bright
newshound1 at digitalmars.com
Thu Dec 24 12:22:08 PST 2009
retard wrote:
> Thu, 24 Dec 2009 11:59:57 -0800, Walter Bright wrote:
>
>> grauzone wrote:
>>> What will you do?
>> Because of casting, there cannot be a thread-local only gc.
>>
>> This does not make the gc inherently unusable. Java, for example, uses
>> only one shared gc. It must, because Java has no concept of thread
>> local.
>
> TLS is provided via library add-on http://java.sun.com/javase/6/docs/api/
> java/lang/ThreadLocal.html
While Java can allocate thread local data, it has no *concept* of thread
local data. Nothing at all prevents one from passing a reference to
thread local data from one thread to another. Since nothing prevents
this, it therefore cannot violate the Java memory model, and therefore
must be supported by the gc.
More information about the Digitalmars-d
mailing list