Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • No, interrupt sets the flag and interrupted gets (and clears) it. Commented Oct 8, 2020 at 3:36
  • Oh god yes, I meant interrupted(). I will correct it.. Commented Oct 8, 2020 at 3:48
  • That doesn't fully correct it. They don't do the same thing. They practically do opposite things. The point is that you can interrupt() any thread but you can only tell whether your own thread is interrupted(). Commented Oct 8, 2020 at 4:08