diff options
author | ByteHamster <info@bytehamster.com> | 2021-11-06 17:25:32 +0100 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2021-11-06 17:26:19 +0100 |
commit | b564f0c1a8c11d0c144d668838f92b7a5bcc6ce5 (patch) | |
tree | a4b9ab2cd0f29ddc6b01acbb3c4e4fe2ee1dce20 /core/src | |
parent | b8e8a940d0e4b03fdb1915a233ae68b8a92fbd1e (diff) | |
download | AntennaPod-b564f0c1a8c11d0c144d668838f92b7a5bcc6ce5.zip |
Do not block PlaybackServiceTaskManager shutdown
If the queue was still loading on another thread, shutting down the
service was not possible.
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceTaskManager.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceTaskManager.java b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceTaskManager.java index 7ddb65c8e..9ca7b6647 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceTaskManager.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceTaskManager.java @@ -350,10 +350,10 @@ public class PlaybackServiceTaskManager { * Cancels all tasks and shuts down the internal executor service of the PSTM. The object should not be used after * execution of this method. */ - public synchronized void shutdown() { + public void shutdown() { EventBus.getDefault().unregister(this); cancelAllTasks(); - schedExecutor.shutdown(); + schedExecutor.shutdownNow(); } private Runnable useMainThreadIfNecessary(Runnable runnable) { |