@@ -663,7 +663,7 @@ class TaskProcessor {
663663 task. cached = true
664664 session. notifyTaskCached(new StoredTaskHandler (task))
665665
666- // -- now bind the results
666+ // -- now emit the results
667667 finalizeTask0(task)
668668 return true
669669 }
@@ -748,7 +748,7 @@ class TaskProcessor {
748748 if ( entry )
749749 session. notifyTaskCached(new CachedTaskHandler (task,entry. trace))
750750
751- // -- now bind the results
751+ // -- now emit the results
752752 finalizeTask0(task)
753753 return true
754754 }
@@ -1162,49 +1162,48 @@ class TaskProcessor {
11621162 }
11631163
11641164 /**
1165- * Bind the expected output files to the corresponding output channels
1166- * @param processor
1165+ * Emit the expected outputs to the corresponding output channels
11671166 */
1168- synchronized protected void bindOutputs ( TaskRun task ) {
1167+ synchronized protected void emitOutputs ( TaskRun task ) {
11691168
1170- // bind the output
1169+ // -- emit the output
11711170 if ( isFair0 ) {
1172- fairBindOutputs0 (task. outputs, task)
1171+ fairEmitOutputs0 (task. outputs, task)
11731172 }
11741173 else {
1175- bindOutputs0 (task. outputs)
1174+ emitOutputs0 (task. outputs)
11761175 }
11771176
1178- // -- finally prints out the task output when 'debug' is true
1177+ // -- finally print the task output when 'debug' is true
11791178 if ( task. config. debug ) {
11801179 task. echoStdout(session)
11811180 }
11821181 }
11831182
1184- protected void fairBindOutputs0 (List emissions , TaskRun task ) {
1183+ protected void fairEmitOutputs0 (List emissions , TaskRun task ) {
11851184 synchronized (isFair0) {
11861185 // decrement -1 because tasks are 1-based
11871186 final index = task. index-1
1188- // store the task emission values in a buffer
1187+ // store the task output values in a buffer
11891188 fairBuffers[index- currentEmission] = emissions
1190- // check if the current task index matches the expected next emission index
1189+ // check if the current task index matches the expected next output index
11911190 if ( currentEmission == index ) {
11921191 while ( emissions!= null ) {
1193- // bind the emission values
1194- bindOutputs0 (emissions)
1192+ // emit the output values
1193+ emitOutputs0 (emissions)
11951194 // remove the head and try with the following
11961195 fairBuffers. remove(0 )
1197- // increase the index of the next emission
1196+ // increase the index of the next output
11981197 currentEmission++
1199- // take the next emissions
1198+ // take the next output
12001199 emissions = fairBuffers[0 ]
12011200 }
12021201 }
12031202 }
12041203 }
12051204
1206- protected void bindOutputs0 (List outputs ) {
1207- // -- bind out the collected values
1205+ protected void emitOutputs0 (List outputs ) {
1206+ // -- emit the output values
12081207 for ( int i = 0 ; i < config. getOutputs(). size(); i++ ) {
12091208 final param = config. getOutputs()[i]
12101209 final value = outputs[i]
@@ -1780,7 +1779,7 @@ class TaskProcessor {
17801779
17811780 /**
17821781 * Finalize the task execution, checking the exit status
1783- * and binding output values accordingly
1782+ * and emitting output values accordingly
17841783 *
17851784 * @param task The {@code TaskRun } instance to finalize
17861785 */
@@ -1832,17 +1831,16 @@ class TaskProcessor {
18321831
18331832 /**
18341833 * Finalize the task execution, checking the exit status
1835- * and binding output values accordingly
1834+ * and emitting output values accordingly
18361835 *
18371836 * @param task The {@code TaskRun } instance to finalize
1838- * @param producedFiles The map of files to be bind the outputs
18391837 */
18401838 private void finalizeTask0 ( TaskRun task ) {
18411839 log. trace " Finalize process > ${ safeTaskName(task)} "
18421840
1843- // -- bind output (files)
1841+ // -- emit outputs
18441842 if ( task. canBind ) {
1845- bindOutputs (task)
1843+ emitOutputs (task)
18461844 publishOutputs(task)
18471845 }
18481846
0 commit comments