A basic problem of Java concurrent programming

clipboard.png

, thread, thread.getName() Thread-0
Thread-0 main
thread.interrupted() main, thread

thread.interrupted? , main

clipboard.png

Jun.08,2022

what the book wants to say is that Thread.interrupted ()


interrupted () is a static method, which is static even when the object is called, and isInterrupted () is the object of the thread in which it is tested.


Thread.interrupted () is a static method that returns whether the current thread is interrupted. That is, the thread in which the method is called returns whether that thread is interrupted or not.

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-1b37d0f-4064f.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-1b37d0f-4064f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?