2 ms·
>What is wrong with locking on "this" ? Instance.this is implicitly public because something else could have a reference to instance. synchronize(this){}
by jayd16 6y ago
>What is wrong with locking on "this" ?
Instance.this is implicitly public because something else could have a reference to instance.
synchronize(this){}
that will lock with the following if its inside instance.
synchronize(instance){}