Normalized thread names (#9581)
Related to #8216 Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
This commit is contained in:
committed by
GitHub
parent
79dfb43e42
commit
ac3f907b36
@@ -27,11 +27,8 @@ class Utils {
|
||||
}
|
||||
|
||||
static Thread backgroundThread(Runnable r, String type, @Nullable Thing thing) {
|
||||
String name = "OH-binding-" + LinuxInputBindingConstants.BINDING_ID + "-" + type;
|
||||
if (thing != null) {
|
||||
name += "-" + thing.getUID();
|
||||
}
|
||||
Thread t = new Thread(r, name);
|
||||
String id = thing == null ? LinuxInputBindingConstants.BINDING_ID : thing.getUID().getAsString();
|
||||
Thread t = new Thread(r, "OH-binding-" + id + "-" + type);
|
||||
t.setDaemon(true);
|
||||
return t;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user