| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 91ac035 commit 4a2dfc9
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -249,8 +249,7 @@ public ErrorCheckerService(JavaEditor debugEditor) { | |||
| 249 | 249 | ||
| 250 | 250 | private Thread errorCheckerThread; | |
| 251 | 251 | private BlockingQueue<Boolean> requestQueue = new ArrayBlockingQueue<>(1); | |
| 252 | - private ScheduledExecutorService scheduler = | ||
| 253 | - Executors.newSingleThreadScheduledExecutor(); | ||
| 252 | + private ScheduledExecutorService scheduler; | ||
| 254 | 253 | volatile ScheduledFuture<?> scheduledUiUpdate = null; | |
| 255 | 254 | volatile long nextUiUpdate = 0; | |
| 256 | 255 | ||
@@ -346,6 +345,7 @@ public void run() { | |||
| 346 | 345 | ||
| 347 | 346 | ||
| 348 | 347 | public void start() { | |
| 348 | + scheduler = Executors.newSingleThreadScheduledExecutor(); | ||
| 349 | 349 | errorCheckerThread = new Thread(mainLoop); | |
| 350 | 350 | errorCheckerThread.start(); | |
| 351 | 351 | } | |
@@ -354,6 +354,9 @@ public void stop() { | |||
| 354 | 354 | cancel(); | |
| 355 | 355 | running = false; | |
| 356 | 356 | errorCheckerThread.interrupt(); | |
| 357 | + if (scheduler != null) { | ||
| 358 | + scheduler.shutdownNow(); | ||
| 359 | + } | ||
| 357 | 360 | } | |
| 358 | 361 | ||
| 359 | 362 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments