This is a bit hazard as ExternalReads should not fiddle with ThreadLocal
graphs (e.g. SCLContext.getCurrent().get("graph")
gitlab #5
Change-Id: I833113eda418fab9ae5ff4b247a7fa09469ad921
try {
ReadGraphImpl queryGraph = graph.withParent(this, null, true);
+ queryGraph.asyncBarrier.inc();
- if(!registered) {
- id.register(graph, this);
+ if (!registered) {
+ id.register(queryGraph, this);
registered = true;
}
-
- queryGraph.asyncBarrier.waitBarrier(id, graph);
+
+ queryGraph.asyncBarrier.dec();
+ queryGraph.asyncBarrier.waitBarrier(id, queryGraph);
} catch (Throwable t) {