コード例 #1
0
ファイル: AbstractStep.java プロジェクト: lassewesth/neo4j
 protected void checkNotifyEndDownstream() {
   if (!stillWorking() && !isCompleted()) {
     if (downstream != null) {
       downstream.endOfUpstream();
     }
     done();
     // else this is the end of the line
     completed = true;
   }
 }
コード例 #2
0
ファイル: AbstractStep.java プロジェクト: digitalstain/neo4j
 protected void checkNotifyEndDownstream() {
   if (!stillWorking() && !isCompleted()) {
     synchronized (this) {
       // Only allow a single thread to notify that we've ended our stream as well as calling
       // done()
       // stillWorking(), once false cannot again return true so no need to check
       if (!isCompleted()) {
         if (downstream != null) {
           downstream.endOfUpstream();
         }
         done();
         completed = true;
       }
     }
   }
 }