sciabarra commented on a change in pull request #121: A more backward 
compatible actionloop proxy
URL: 
https://github.com/apache/openwhisk-runtime-go/pull/121#discussion_r379602165
 
 

 ##########
 File path: openwhisk/executor.go
 ##########
 @@ -108,15 +135,54 @@ func (proc *Executor) Start() error {
                return fmt.Errorf("command exited")
        }
        Debug("pid: %d", proc.cmd.Process.Pid)
+
        go func() {
                proc.cmd.Wait()
                proc.exited <- true
        }()
+
+       // not waiting for an ack, so use a timeout
+       if !waitForAck {
+               select {
+               case <-proc.exited:
+                       return fmt.Errorf("command exited")
+               case <-time.After(DefaultTimeoutStart):
+                       return nil
+               }
+       }
+
+       // wait for acknowledgement
+       Debug("waiting for an ack")
+       ack := make(chan error)
 
 Review comment:
   No it is not guarded. If there is not the OW_WAIT_FOR_ACK variable, the 
proxy behaves as before so it waits for a timeout OR a termination then 
returns. Otherwise it waits for an ack.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to