Github user spmallette commented on a diff in the pull request: https://github.com/apache/tinkerpop/pull/899#discussion_r206485952 --- Diff: gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractOpProcessor.java --- @@ -72,8 +73,19 @@ protected AbstractOpProcessor(final boolean manageTransactions) { * @param context The Gremlin Server {@link Context} object containing settings, request message, etc. * @param itty The result to iterator * @throws TimeoutException if the time taken to serialize the entire result set exceeds the allowable time. + * @see #handleIterator(ResponseHandlerContext, Iterator) */ protected void handleIterator(final Context context, final Iterator itty) throws TimeoutException, InterruptedException { + handleIterator(new ResponseHandlerContext(context), itty); + } + + /** + * A variant of {@link #handleIterator(Context, Iterator)} that is suitable for use in situations when multiple + * threads may produce {@link ResponseStatusCode#isFinalResponse() final} response messages concurrently. + * @see #handleIterator(Context, Iterator) + */ + protected void handleIterator(final ResponseHandlerContext rhc, final Iterator itty) throws TimeoutException, InterruptedException { --- End diff -- same question here as on `evalOpInternal()` - is it reasonable for someone to directly call this method? or is it more likely that they would continue to call the original method which would let us control creation of the `ResponseHandlerContext` ourselves?
---