Github user ajs6f commented on a diff in the pull request:

    https://github.com/apache/jena/pull/157#discussion_r71160809
  
    --- Diff: 
jena-arq/src/main/java/org/apache/jena/atlas/data/SortedDataBag.java ---
    @@ -69,19 +69,81 @@
         
         protected final ThresholdPolicy<E> policy;
         protected final SerializationFactory<E> serializationFactory;
    -    protected final Comparator<? super E> comparator;
    +    protected final CanAbortComparator comparator;
         
         protected boolean finishedAdding = false;
         protected boolean spilled = false;
         protected boolean closed = false;
    +    protected volatile boolean cancelled;
         
         public SortedDataBag(ThresholdPolicy<E> policy, 
SerializationFactory<E> serializerFactory, Comparator<? super E> comparator)
         {
             this.policy = policy;
             this.serializationFactory = serializerFactory;
    -        this.comparator = comparator;
    +        this.comparator = new CanAbortComparator(comparator);
         }
         
    +    private final class CanAbortComparator implements Comparator<E> 
    --- End diff --
    
    A minor point, Jena seems usually to use a "adjectival" naming, i.e. 
`AbortableComparator`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to