import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
+import org.openhab.core.thing.Thing;
/**
* Utilities
private Utils() {
}
- static Thread backgroundThread(Runnable r, Class<?> clazz, @Nullable String instance) {
- String name = LinuxInputBindingConstants.BINDING_ID + " :: " + clazz.getSimpleName();
- if (instance != null) {
- name += " :: " + instance;
+ 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);
t.setDaemon(true);