[StartLevel] Use wrapped scheduler to make swallowed exceptions visible (#2481)

Signed-off-by: Fabian Wolter <github@fabian-wolter.de>
pull/2488/head
Fabian Wolter 2021-09-15 19:33:21 +02:00 committed by GitHub
parent 4f8f7254e0
commit ea26451f66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -20,7 +20,6 @@ import java.util.Map.Entry;
import java.util.Set;
import java.util.TreeSet;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
@ -32,6 +31,7 @@ import org.openhab.core.common.NamedThreadFactory;
import org.openhab.core.events.EventPublisher;
import org.openhab.core.events.system.StartlevelEvent;
import org.openhab.core.events.system.SystemEventFactory;
import org.openhab.core.internal.common.WrappedScheduledExecutorService;
import org.openhab.core.service.ReadyService.ReadyTracker;
import org.osgi.framework.BundleContext;
import org.osgi.framework.startlevel.FrameworkStartLevel;
@ -93,8 +93,8 @@ public class StartLevelService {
private final Map<Integer, ReadyMarker> slmarker = new ConcurrentHashMap<>();
private @Nullable ScheduledFuture<?> job;
private final ScheduledExecutorService scheduler = Executors
.newSingleThreadScheduledExecutor(new NamedThreadFactory("startlevel"));
private final ScheduledExecutorService scheduler = new WrappedScheduledExecutorService(1,
new NamedThreadFactory("startlevel"));
private int openHABStartLevel = 0;