You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2020/12/14 16:30:27 UTC
[groovy] branch master updated: Tweak parallel querying and doco
This is an automated email from the ASF dual-hosted git repository.
sunlan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/master by this push:
new d09eb7b Tweak parallel querying and doco
d09eb7b is described below
commit d09eb7bcc004479e36235028628d8d65a216722e
Author: Daniel Sun <su...@apache.org>
AuthorDate: Tue Dec 15 00:30:07 2020 +0800
Tweak parallel querying and doco
---
.../groovy/ginq/provider/collection/runtime/QueryableCollection.java | 4 +++-
subprojects/groovy-ginq/src/spec/doc/ginq-userguide.adoc | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/subprojects/groovy-ginq/src/main/groovy/org/apache/groovy/ginq/provider/collection/runtime/QueryableCollection.java b/subprojects/groovy-ginq/src/main/groovy/org/apache/groovy/ginq/provider/collection/runtime/QueryableCollection.java
index 3c6ffb1..e00377f 100644
--- a/subprojects/groovy-ginq/src/main/groovy/org/apache/groovy/ginq/provider/collection/runtime/QueryableCollection.java
+++ b/subprojects/groovy-ginq/src/main/groovy/org/apache/groovy/ginq/provider/collection/runtime/QueryableCollection.java
@@ -430,7 +430,9 @@ class QueryableCollection<T> implements Queryable<T>, Serializable {
Map<Integer, List<U>> hashTable = hashTableHolder.getObject();
if (null == hashTable) {
synchronized (hashTableHolder) {
- hashTable = hashTableHolder.getObject(hashTableSupplier);
+ if (null == hashTable) {
+ hashTable = hashTableHolder.getObject(hashTableSupplier);
+ }
}
}
return hashTable;
diff --git a/subprojects/groovy-ginq/src/spec/doc/ginq-userguide.adoc b/subprojects/groovy-ginq/src/spec/doc/ginq-userguide.adoc
index 917bc31..1db964d 100644
--- a/subprojects/groovy-ginq/src/spec/doc/ginq-userguide.adoc
+++ b/subprojects/groovy-ginq/src/spec/doc/ginq-userguide.adoc
@@ -457,7 +457,7 @@ include::../test/org/apache/groovy/ginq/GinqTest.groovy[tags=ginq_tips_07,indent
----
==== Parallel Querying
-Parallel querying is useful when querying big data sources. It is disabled by default, but we could enable it by hand:
+Parallel querying is especially efficient when querying big data sources. It is disabled by default, but we could enable it by hand:
[source, groovy]
----
include::../test/org/apache/groovy/ginq/GinqTest.groovy[tags=ginq_tips_08,indent=0]