You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@curator.apache.org by GitBox <gi...@apache.org> on 2022/05/28 12:02:45 UTC
[GitHub] [curator] tisonkun opened a new pull request, #419: CURATOR-640: Run PathChildrenCache's & TreeCache's default thread isolated
tisonkun opened a new pull request, #419:
URL: https://github.com/apache/curator/pull/419
Signed-off-by: tison <wa...@gmail.com>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@curator.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [curator] eolivelli merged pull request #419: CURATOR-640: Run PathChildrenCache's & TreeCache's default thread isolated
Posted by GitBox <gi...@apache.org>.
eolivelli merged PR #419:
URL: https://github.com/apache/curator/pull/419
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@curator.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [curator] eolivelli commented on a diff in pull request #419: CURATOR-640: Run PathChildrenCache's & TreeCache's default thread isolated
Posted by GitBox <gi...@apache.org>.
eolivelli commented on code in PR #419:
URL: https://github.com/apache/curator/pull/419#discussion_r897876484
##########
curator-recipes/src/test/java/org/apache/curator/framework/recipes/cache/TestPathChildrenCache.java:
##########
@@ -1151,4 +1151,45 @@ public void invoke() throws Exception
TestCleanState.closeAndTestClean(client);
}
}
+
+ @Test
+ public void testIsolatedThreadGroup() throws Exception {
+ AtomicReference<Throwable> exception = new AtomicReference<>();
+
+ CuratorFramework client = CuratorFrameworkFactory.newClient(server.getConnectString(), 30000, 30000, new RetryOneTime(1));
+ client.getUnhandledErrorListenable().addListener((message, e) -> exception.set(e));
+ client.start();
+
+ ThreadGroup threadGroup1 = new ThreadGroup("testGroup1");
+ Thread thread1 = new Thread(threadGroup1, () -> {
+ try ( final PathChildrenCache cache = new PathChildrenCache(client, "/test1", true) ) {
+ cache.start();
+ Thread.sleep(1000);
+ } catch (Exception e) {
+ exception.set(e);
+ }
+ });
+
+ thread1.start();
+ thread1.join();
+ assertNull(exception.get());
Review Comment:
nit: I suggest to use CompletableFuture, not a big deal in any case
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@curator.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [curator] tisonkun commented on pull request #419: CURATOR-640: Run PathChildrenCache's & TreeCache's default thread isolated
Posted by GitBox <gi...@apache.org>.
tisonkun commented on PR #419:
URL: https://github.com/apache/curator/pull/419#issuecomment-1140962515
ping @eolivelli @Randgalt @cammckenzie
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@curator.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [curator] tisonkun commented on pull request #419: CURATOR-640: Run PathChildrenCache's & TreeCache's default thread isolated
Posted by GitBox <gi...@apache.org>.
tisonkun commented on PR #419:
URL: https://github.com/apache/curator/pull/419#issuecomment-1140247842
... also cc @shixiaogang
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@curator.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org