Closed Olivier-Bastide-Numfem closed 7 months ago
Ok Ami, after some deeper investigations, I've pointed the problem. Usage of Thread.Abort in my case is not good, because work item are using files, and aborting the thread causes file's handle not being disposed, hence my issues.
Hi Ami,
I'm having an issue and need your advice. Code is very simple :
In each working items, the
Thread.Abort
is handled to perform cleaning stuff. What I want is, in case of cancellation, to wait for all threads in the pool to have this "cleaning stuff" done. But thepool.WaitForIdle()
in thecatch
doesn't seams to block, as there is some thread still alive doing their cleansing.Is there a better/correct way to do this with your library ? Thanks Ami !