Streams can be published across PubSub now

This commit is contained in:
Taha authored and John Colvin committed 2023-09-30 12:59:02 -04:00
1 parent 7bb7f1a5e2
commit fa4da63c24
30 files changed
+769 -1270

No files matched your search

@@ -12,7 +12,24 @@ Console.WriteLine("Starting DSPublisher...");
//TestPubliser.publish();
//TestPubliser.subscribe();
TestPublisher ts = new TestPublisher(false);
ts.keep_publishing(TimeSpan.FromSeconds(10));
// TestPublisher ts = new TestPublisher(false);
// ts.keep_publishing(TimeSpan.FromSeconds(10));
_subscribe_to_stream();
void _subscribe_to_stream() {
BCG.ViewStream vs = new TableStream("time");
vs.onChange += on_change;
}
while (true) {
System.Threading.Thread.Sleep(TimeSpan.FromSeconds(1));
ViewStreamDatabase.instance.doWork();
}
void on_change(object obj) {
DataPacket dp = obj as DataPacket;
dp.newRows.print_table((col) => { return 10; });
}