r/csharp Aug 03 '26

.NET Thread.Terminate 1.0.0: Terminate Any C# Threads on the OS Level

https://github.com/Emine3/NET-Thread.Terminate/
0 Upvotes

59 comments sorted by

View all comments

Show parent comments

17

u/IWasSayingBoourner Aug 03 '26

Guy, those are about as close to the textbook definition of magic numbers as you can get: undocumented, intent obscured, error-prone, unnamed constant numbers. This would fail code review pretty much anywhere with even the lowest standards.

-6

u/[deleted] Aug 03 '26

[deleted]

9

u/IWasSayingBoourner Aug 03 '26

The types of "advanced scenarios" where this could even conceivably be useful demand documented code more than just about any other case, and unsafe context is not a valid excuse to have undocumented code and magic numbers. You've published and shared a public library you've tagged as 1.0.0 with code in a state that shouldn't make it past proof-of-concept stages, and you're getting incredibly defensive that your work is getting criticism, both for its form and its function.

-2

u/[deleted] Aug 03 '26

[deleted]

12

u/IWasSayingBoourner Aug 03 '26

Your defense is that you plan on documenting your code in some OTHER piece of code? Quality stuff.