mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
fn: common.WaitGroup improvements (#940)
* fn: common.WaitGroup improvements *) Split the API into AddSession/DoneSession *) Only wake up listeners when session count reaches zero. * fn: WaitGroup go-routine blast test * fn: test fix and rebase fixup
This commit is contained in:
@@ -94,7 +94,7 @@ func (r *gRPCRunner) TryExec(ctx context.Context, call pool.RunnerCall) (bool, e
|
||||
if !r.shutWg.AddSession(1) {
|
||||
return true, ErrorRunnerClosed
|
||||
}
|
||||
defer r.shutWg.AddSession(-1)
|
||||
defer r.shutWg.DoneSession()
|
||||
|
||||
// extract the call's model data to pass on to the pure runner
|
||||
modelJSON, err := json.Marshal(call.Model())
|
||||
|
||||
Reference in New Issue
Block a user