In my c# windows application,
I have two buttons export and cancel.
In my export button, here i am exporting sql datatable to .csv file.its running under the thread.
thrThreadExportProcess = new Thread(new ThreadStart(startExport));
thrThreadExportProcess.IsBackground = true;
while its exporting process is running, user hits the cancel button here i am aborting the thread,then joining the thread and deleting the exported file.
while its joining Thread, application get hangs up some time then it will run.
my question is why its hangs up some time.
here is the part of the code in cancel button.
Kindly provide your valuble Suggestions.