diff --git a/src/modules/MouseWithoutBorders/App/Class/Common.Helper.cs b/src/modules/MouseWithoutBorders/App/Class/Common.Helper.cs index ccbec575081b..2985f6d6dd4e 100644 --- a/src/modules/MouseWithoutBorders/App/Class/Common.Helper.cs +++ b/src/modules/MouseWithoutBorders/App/Class/Common.Helper.cs @@ -10,6 +10,7 @@ using System.IO; using System.Linq; using System.Security.Principal; +using System.Threading; using System.Windows.Forms; // @@ -72,6 +73,8 @@ private static void WatchDogThread() private static void HelperThread() { + using var asyncFlowControl = ExecutionContext.SuppressFlow(); + try { while (true) diff --git a/src/modules/MouseWithoutBorders/App/Class/Program.cs b/src/modules/MouseWithoutBorders/App/Class/Program.cs index ac33da9ae983..2ac96332f5de 100644 --- a/src/modules/MouseWithoutBorders/App/Class/Program.cs +++ b/src/modules/MouseWithoutBorders/App/Class/Program.cs @@ -378,6 +378,8 @@ internal static void StartInputCallbackThread() private static void InputCallbackThread() { + using var asyncFlowControl = ExecutionContext.SuppressFlow(); + Common.InputCallbackThreadID = Thread.CurrentThread.ManagedThreadId; while (!Common.InitDone) { diff --git a/src/modules/MouseWithoutBorders/App/Class/SocketStuff.cs b/src/modules/MouseWithoutBorders/App/Class/SocketStuff.cs index 6f354e4af174..06b0dda99df7 100644 --- a/src/modules/MouseWithoutBorders/App/Class/SocketStuff.cs +++ b/src/modules/MouseWithoutBorders/App/Class/SocketStuff.cs @@ -679,6 +679,8 @@ internal int TcpSend(TcpSk tcp, DATA data) private void TCPServerThread(object param) { + using var asyncFlowControl = ExecutionContext.SuppressFlow(); + try { TcpListener server = param as TcpListener; @@ -1547,6 +1549,8 @@ private void MainTCPRoutine(TcpSk tcp, string machineName, bool isClient) private static void AcceptConnectionAndSendClipboardData(object param) { + using var asyncFlowControl = ExecutionContext.SuppressFlow(); + TcpListener server = param as TcpListener; do