public static void Main(String[] Args) { QConnection q = new QBasicConnection(Args.Length >= 1 ? Args[0] : "localhost", Args.Length >= 2 ? int.Parse(Args[1]) : 5001, null, null); try { q.Open(); Console.WriteLine("conn: " + q + " protocol: " + q.ProtocolVersion); Console.WriteLine("WARNING: this application overwrites: .u.upd function on q process"); Console.WriteLine("Press <ENTER> to close application"); q.Sync(".u.upd:{[x;y] show (x;y)};"); PublisherTask pt = new PublisherTask(q); Thread workerThread = new Thread(pt.Run); workerThread.Start(); Console.ReadLine(); pt.Stop(); workerThread.Join(); } catch (Exception e) { Console.WriteLine("`" + e.Message); } finally { q.Close(); } }
public static void Main(string[] Args) { QConnection q = new QBasicConnection(Args.Length >= 1 ? Args[0] : "localhost", Args.Length >= 2 ? int.Parse(Args[1]) : 5001, null, null); try { q.Open(); Console.WriteLine("conn: " + q + " protocol: " + q.ProtocolVersion); Console.WriteLine("WARNING: this application overwrites: .u.upd function on q process"); Console.WriteLine("Press <ENTER> to close application"); q.Sync(".u.upd:{[x;y] show (x;y)};"); var pt = new PublisherTask(q); var workerThread = new Thread(pt.Run); workerThread.Start(); Console.ReadLine(); pt.Stop(); workerThread.Join(); } catch (Exception e) { Console.WriteLine("`" + e.Message); } finally { q.Close(); } }