I have ran into a perfomance problem where 880 threads are doing synchronized() { method() }
in the same time and this has lead to a major perfomance problem.
Is it possible that there is some limit of threads waiting at synchronized()
? Where can I get the limit?
Another question is what is best to put into synchronized( ? )
. Because I have different classes accessing that variable, so I can not put synchronized(this)
.