c# - Thread Abort in .NET -
I have a thread that analyzes a file and calls the transaction to the database, audit in each transaction Entry is Transaction There is nothing wrong with calling the thread. To stop file processing ()? Compared to ugly safe places everywhere?
The file will be closed after a canceled call. The obvious problem would be the risk of abandoning a transaction, which would be indefinitely (or periodically) of
type off dirt - irreversible
monitors
locks, sequvers, etc., memory leaks, etc. In essence: try as hard as possible until you exactly do not know what it is doing at the time, it is possible to avoid canceling the thread and the only way you can know that it What is doing if it is already in a known "safe place" (to use your word) - then you can throw an exception or something and increase it yourself in a managed way.
Comments
Post a Comment