i cannot get it, how weak type containers are related to thread safety?
A garbage collection happens instantly for language side , so there is
no way how a weak collection can be in inconsistent state when
it is not known yet, if object is dead or alive.
By accessing an object in weak container, you put it's reference on
stack, which means that if GC will happen at that stage, a
corresponding object will not be
collected until at least next GC phase.

Now what is "thread-safe weak collections" and what they should serve for?
WeakIdentityKeyDictionary? It is not thread-safe. And why it should,
when you can easily make it thread-safe by wrapping it with
appropriate container object.
What else?
WeakArray? it is already thread safe: reads and writes are primitives
and size is immutable.

What else? weak set? again, put a wrapper around it and you got thread-safety.

And what is 'self-repairing'? Can you explain what is it?

--
Best regards,
Igor Stasenko.

Reply via email to