From 08e0765b247e71550367ad965c6d0e91587fe2b6 Mon Sep 17 00:00:00 2001 From: Bo Ding Date: Fri, 29 Apr 2022 07:46:14 +0800 Subject: [PATCH] docs: update subscribe_demo.c --- docs-examples/c/subscribe_demo.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs-examples/c/subscribe_demo.c b/docs-examples/c/subscribe_demo.c index 3c6c4176f7..b523b4667e 100644 --- a/docs-examples/c/subscribe_demo.c +++ b/docs-examples/c/subscribe_demo.c @@ -1,3 +1,4 @@ +// A simple demo for asynchronous subscription. // compile with: // gcc -o subscribe_demo subscribe_demo.c -ltaos @@ -52,6 +53,8 @@ int main() { int interval = 2000; // consumption interval in microseconds. TAOS_SUB* tsub = taos_subscribe(taos, restart, topic, sql, subscribe_callback, NULL, interval); + // wait for insert from others process. you can open TDengine CLI to insert some records for test. + getchar(); // press Enter to stop printf("total rows consumed: %d\n", nTotalRows); @@ -60,4 +63,4 @@ int main() { taos_close(taos); taos_cleanup(); -} \ No newline at end of file +} -- GitLab