private void TheThread() { try { SingleThreadedAsync.Run(() => Runner()); } catch (Exception exp) { Console.Error.WriteLine("SingleThreadCalculation: " + exp.Message); } }
public static void ConnectAndRunAdapter(string host, int port, AdapterBase adapter) { var connector = new TcpConnectorSlave(); connector.Connect(host, port); try { SingleThreadedAsync.Run(() => Loop(connector, adapter)); } catch (Exception exp) { Console.Error.WriteLine("EXCEPTION: " + exp.Message); } }