Skip to content

Commit 505616e

Browse files
committed
Set watcher thread as background - fixes #73
1 parent ee24925 commit 505616e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Source/ExcelDna.IntelliSense/UIMonitor/UIMonitor.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ public UIMonitor(SynchronizationContext syncContextMain)
3232
// Make a separate thread and set to MTA, according to: https://msdn.microsoft.com/en-us/library/windows/desktop/ee671692%28v=vs.85%29.aspx
3333
// This thread was initially intended for UI Automation calls, particularly adding and removing event handlers.
3434
var threadAuto = new Thread(RunUIAutomation);
35+
threadAuto.IsBackground = true;
36+
threadAuto.Name = "ExcelDna.Intellisense.WatcherThread";
3537
threadAuto.SetApartmentState(ApartmentState.MTA);
3638
threadAuto.Start();
3739
}

0 commit comments

Comments
 (0)