Cancellation of a timeout should occur in existing thread pool

Prior to this change, the cancellation of a timeout occured in the ForkJoinPool 
when an existing thread pool in the GremlinExecutor was present to handle that 
job. CTR


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/d699cb6c
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/d699cb6c
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/d699cb6c

Branch: refs/heads/TINKERPOP-1278
Commit: d699cb6c00ccef02a7b93948cf185a61481dc12b
Parents: 8c04d61
Author: Stephen Mallette <[email protected]>
Authored: Tue Jun 28 13:59:36 2016 -0400
Committer: Stephen Mallette <[email protected]>
Committed: Tue Jun 28 13:59:36 2016 -0400

----------------------------------------------------------------------
 .../apache/tinkerpop/gremlin/groovy/engine/GremlinExecutor.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d699cb6c/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutor.java
----------------------------------------------------------------------
diff --git 
a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutor.java
 
b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutor.java
index 2476114..63721eb 100644
--- 
a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutor.java
+++ 
b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutor.java
@@ -310,7 +310,7 @@ public class GremlinExecutor implements AutoCloseable {
             evaluationFuture.handleAsync((v, t) -> {
                 logger.debug("Killing scheduled timeout on script evaluation 
as the eval completed (possibly with exception).");
                 return sf.cancel(true);
-            });
+            }, scheduledExecutorService);
         }
 
         return evaluationFuture;

Reply via email to