Skip to content

Conversation

@doctorjei
Copy link
Contributor

The Thread.stop() call has been removed as of Java 21, so the old call to stop() would cause the rest of the battle to be aborted; e.g., if you were running 100 rounds, but after the second a robot's thread needs to be terminated, then that would abort the rest of the rounds.

By swapping in interrupt, the thread should still terminate, but gracefully.

@flemming-n-larsen flemming-n-larsen self-requested a review December 9, 2025 15:40
Copy link
Member

@flemming-n-larsen flemming-n-larsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for fixing this! :)
I will do a release soon

@flemming-n-larsen flemming-n-larsen merged commit ae64b4c into robo-code:main Dec 9, 2025
@doctorjei
Copy link
Contributor Author

Glad to help! Actually my students caught it. :D I just fixed it so they could keep working. Thanks for the quick response!

@flemming-n-larsen
Copy link
Member

@doctorjei You are welcome., and say thanks to the students as well. 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants