curator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randgalt <...@git.apache.org>
Subject [GitHub] curator pull request #297: [CURATOR-495] Fixes race in many Curator recipes ...
Date Mon, 17 Dec 2018 00:56:40 GMT
Github user Randgalt commented on a diff in the pull request:

    https://github.com/apache/curator/pull/297#discussion_r242005491
  
    --- Diff: curator-framework/src/main/java/org/apache/curator/framework/CuratorFrameworkFactory.java
---
    @@ -474,6 +477,28 @@ public Builder schemaSet(SchemaSet schemaSet)
                 return this;
             }
     
    +        /**
    +         * Curator (and user) recipes will use this executor to call notifyAll
    +         * and other blocking calls that might normally block ZooKeeper's event thread.
    +         * By default, an executor is allocated internally using the provided (or default)
    +         * {@link #threadFactory(java.util.concurrent.ThreadFactory)}. Use this method
    +         * to set a custom executor.
    +         *
    +         * @param runSafeService executor to use for calls to notifyAll from Watcher
callbacks etc
    +         * @return this
    +         * @since 4.1.0
    +         */
    +        public Builder runSafeService(Executor runSafeService)
    +        {
    +            this.runSafeService = runSafeService;
    +            return null;
    --- End diff --
    
    damn - good catch


---

Mime
View raw message