This is an automated email from the ASF dual-hosted git repository.

zhaoxinyi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iotdb-docs.git


The following commit(s) were added to refs/heads/main by this push:
     new cd64b5ee fix (#449)
cd64b5ee is described below

commit cd64b5ee92e10389bb2352d2775d8e3d52d79370
Author: VGalaxies <[email protected]>
AuthorDate: Wed Dec 4 17:44:51 2024 +0800

    fix (#449)
---
 src/UserGuide/Master/Tree/API/Programming-Java-Native-API.md    | 4 +++-
 src/UserGuide/latest/API/Programming-Java-Native-API.md         | 4 +++-
 src/zh/UserGuide/Master/Tree/API/Programming-Java-Native-API.md | 4 +++-
 src/zh/UserGuide/latest/API/Programming-Java-Native-API.md      | 4 +++-
 4 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/src/UserGuide/Master/Tree/API/Programming-Java-Native-API.md 
b/src/UserGuide/Master/Tree/API/Programming-Java-Native-API.md
index 24259056..387a9e07 100644
--- a/src/UserGuide/Master/Tree/API/Programming-Java-Native-API.md
+++ b/src/UserGuide/Master/Tree/API/Programming-Java-Native-API.md
@@ -773,7 +773,9 @@ for (int i = 0; i < 8; ++i) {
                     .buildPushConsumer()) {
               consumer2.open();
               consumer2.subscribe(TOPIC_2);
-            } catch (final IOException e) {
+              // block the consumer main thread
+              Thread.sleep(Long.MAX_VALUE);
+            } catch (final IOException | InterruptedException e) {
               throw new RuntimeException(e);
             }
           });
diff --git a/src/UserGuide/latest/API/Programming-Java-Native-API.md 
b/src/UserGuide/latest/API/Programming-Java-Native-API.md
index 24259056..387a9e07 100644
--- a/src/UserGuide/latest/API/Programming-Java-Native-API.md
+++ b/src/UserGuide/latest/API/Programming-Java-Native-API.md
@@ -773,7 +773,9 @@ for (int i = 0; i < 8; ++i) {
                     .buildPushConsumer()) {
               consumer2.open();
               consumer2.subscribe(TOPIC_2);
-            } catch (final IOException e) {
+              // block the consumer main thread
+              Thread.sleep(Long.MAX_VALUE);
+            } catch (final IOException | InterruptedException e) {
               throw new RuntimeException(e);
             }
           });
diff --git a/src/zh/UserGuide/Master/Tree/API/Programming-Java-Native-API.md 
b/src/zh/UserGuide/Master/Tree/API/Programming-Java-Native-API.md
index 07e3dce6..7c952a91 100644
--- a/src/zh/UserGuide/Master/Tree/API/Programming-Java-Native-API.md
+++ b/src/zh/UserGuide/Master/Tree/API/Programming-Java-Native-API.md
@@ -726,7 +726,9 @@ for (int i = 0; i < 8; ++i) {
                     .buildPushConsumer()) {
               consumer2.open();
               consumer2.subscribe(TOPIC_2);
-            } catch (final IOException e) {
+              // block the consumer main thread
+              Thread.sleep(Long.MAX_VALUE);
+            } catch (final IOException | InterruptedException e) {
               throw new RuntimeException(e);
             }
           });
diff --git a/src/zh/UserGuide/latest/API/Programming-Java-Native-API.md 
b/src/zh/UserGuide/latest/API/Programming-Java-Native-API.md
index d2811bbb..8c68005d 100644
--- a/src/zh/UserGuide/latest/API/Programming-Java-Native-API.md
+++ b/src/zh/UserGuide/latest/API/Programming-Java-Native-API.md
@@ -725,7 +725,9 @@ for (int i = 0; i < 8; ++i) {
                     .buildPushConsumer()) {
               consumer2.open();
               consumer2.subscribe(TOPIC_2);
-            } catch (final IOException e) {
+              // block the consumer main thread
+              Thread.sleep(Long.MAX_VALUE);
+            } catch (final IOException | InterruptedException e) {
               throw new RuntimeException(e);
             }
           });

Reply via email to