https://www.geekyhacker.com/timeout-a-callable-by-another-thread-or-executorservice-awaittermination/
Timeout a callable by another thread or ExecutorService awaitTermination