mirror of https://github.com/zlatinb/muwire
Remove unnecessary executor
It was doing nothing but starting and stoppingpull/37/head
parent
855183397b
commit
2935ee1a1d
|
@ -19,9 +19,6 @@ class PersisterService extends BasePersisterService {
|
||||||
final int interval
|
final int interval
|
||||||
final Timer timer
|
final Timer timer
|
||||||
final FileManager fileManager
|
final FileManager fileManager
|
||||||
final ExecutorService persisterExecutor = Executors.newSingleThreadExecutor({ r ->
|
|
||||||
new Thread(r, "file persister")
|
|
||||||
} as ThreadFactory)
|
|
||||||
|
|
||||||
PersisterService(File location, EventBus listener, int interval, FileManager fileManager) {
|
PersisterService(File location, EventBus listener, int interval, FileManager fileManager) {
|
||||||
this.location = location
|
this.location = location
|
||||||
|
@ -33,7 +30,6 @@ class PersisterService extends BasePersisterService {
|
||||||
|
|
||||||
void stop() {
|
void stop() {
|
||||||
timer.cancel()
|
timer.cancel()
|
||||||
persisterExecutor.shutdown()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void onUILoadedEvent(UILoadedEvent e) {
|
void onUILoadedEvent(UILoadedEvent e) {
|
||||||
|
|
Loading…
Reference in New Issue