Weldon Washburn wrote:
Maybe I am misunderstanding the code. It looks like
"alive_thread_count--;"
could be executed concurrently by multiple threads and consequently end up
with an incorrect value. Is it OK to have an approximate value?
This variable is not used by JVMTI code, JVMTI doesn't deal with
statistics. The code was added at revision 513013 from HARMONY-2059 and
is an implementation of j.l.management.ThreadMXBean native part.
Since this is just statistics, I think it may have an approximate value.
--
Gregory