killing vs interrupting a Thread

what is the machine functionality difference between killing vs interrupting a Thread and why do we no longer use killing a Thread? maybe something to do with error handling idk
5 Replies
JavaBot
JavaBot3w ago
This post has been reserved for your question.
Hey @SidKid! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
dan1st
dan1st3w ago
Interrupting means asking a thread to stop and allowing the thread to control how it stops. Killing means the thread is stopped without it having any chance to react to anything which can easily cause it to not close resources (e.g. network connections) which can lead to memory leaks or corrupting files or other data (e.g. when killing a thread while it writes to a file, it leaves the file in an incomplete state).
JavaBot
JavaBot3w ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.
nikcho-kouhai
nikcho-kouhai3w ago
Killing bad, be friends
JavaBot
JavaBot3w ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.

Did you find this page helpful?