How are tasks in the java thread pool timed?

if I start my own thread, I usually write

.

t.join(2000)
t..interrupt();

after using ThreadPoolExecutor to execute a task, I don"t know how to force a task that has timed out to stop.

Mar.23,2021

one solution is to use a get method in FutureTask, with the parameter timeout. If the execution time exceeds timeout, and throws TimeoutException, you can catch it for processing

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3b7b3-4d936.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3b7b3-4d936.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?