Exit thumbnail generation loop on ThreadAbortException
- Prevent exception suppression - Name thread for improved debugging experience
This commit is contained in:
parent
9a91ddf219
commit
8870fe3b1d
1 changed files with 6 additions and 0 deletions
|
|
@ -265,6 +265,8 @@ namespace MatterHackers.MatterControl
|
|||
|
||||
private async void ThumbGeneration()
|
||||
{
|
||||
Thread.CurrentThread.Name = $"ThumbnailGeneration";
|
||||
|
||||
while(true)
|
||||
{
|
||||
while(queuedThumbCallbacks.Count > 0)
|
||||
|
|
@ -284,6 +286,10 @@ namespace MatterHackers.MatterControl
|
|||
{
|
||||
await callback();
|
||||
}
|
||||
catch(ThreadAbortException e)
|
||||
{
|
||||
return;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine("Error generating thumbnail: " + ex.Message);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue