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.