This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Queue; | |
import java.util.concurrent.Executors; | |
import java.util.concurrent.Future; | |
import java.util.concurrent.LinkedBlockingQueue; | |
import java.util.concurrent.ScheduledExecutorService; | |
import java.util.concurrent.TimeUnit; | |
public class TimeoutTaskThreadPoolExecutor { | |
private final Queue<Task> awaitingTasks; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Thread will maybe be stopped in 5 seconds... 1587805793341 | |
Message from remote at 1587805796619: Hello from netcat | |
Is thread dead yet? 1587805798342 | |
Message from remote at 1587805811746: I am still alive :) | |
Message from remote at 1587805818037: OK see you! | |
End of thread process: 1587805818939 |