Closed hahn-kev closed 4 months ago
if you call Thread abort in any new dotnet code it will throw an exception. This is a problem in Chorus because it's used in the HgProcess output reader here: https://github.com/sillsdev/chorus/blob/04e1e281629260cdc89e718f418d9c0491859a44/src/LibChorus/Utilities/HgProcessOutputReader.cs#L87-L90
Ultimately the code each of those threads is running needs to be rewritten to check something like a cancellation token which we could cancel there instead of aborting the threads.
Other places it's used:
https://github.com/sillsdev/chorus/blob/04e1e281629260cdc89e718f418d9c0491859a44/src/ChorusHub/Advertiser.cs#L101-L107
https://github.com/sillsdev/chorus/blob/04e1e281629260cdc89e718f418d9c0491859a44/src/ChorusHub/HgServeRunner.cs#L188-L193
https://github.com/sillsdev/chorus/blob/04e1e281629260cdc89e718f418d9c0491859a44/src/LibChorus/ProcessStream.cs#L113-L118
https://github.com/sillsdev/chorus/blob/04e1e281629260cdc89e718f418d9c0491859a44/src/LibChorus/Utilities/ProcessStream.cs#L125-L130
if you call Thread abort in any new dotnet code it will throw an exception. This is a problem in Chorus because it's used in the HgProcess output reader here: https://github.com/sillsdev/chorus/blob/04e1e281629260cdc89e718f418d9c0491859a44/src/LibChorus/Utilities/HgProcessOutputReader.cs#L87-L90
Ultimately the code each of those threads is running needs to be rewritten to check something like a cancellation token which we could cancel there instead of aborting the threads.