Reputation: 64904
what are the benefits of setting a name
and thread group
for one thread when creating a it in java ? and can I monitor it in LogCat
(in android) ?
Upvotes: 1
Views: 128
Reputation: 76251
I would also add that it helps with debugging, in addition to logging - when you look at threads in jstack / jvisualvm it's easier to see what each is.
Upvotes: 1
Reputation: 310978
The benefit of setting a name is mainly for logging purposes.
The benefit of setting a thread group is so you can use the methods of ThreadGroup
on it.
Upvotes: 2