good morning!!!!

Skip to content
Snippets Groups Projects
Commit 057bf519 authored by Garet Halliday's avatar Garet Halliday
Browse files

fix

parent 31a95822
No related branches found
No related tags found
No related merge requests found
......@@ -28,8 +28,11 @@ func main() {
if err != nil {
panic(err)
}
return
}
log.Println("running in zalando compatibility mode")
conf, err := zalando.Load()
if err != nil {
panic(err)
......
package flip
import "sync"
import (
"sync"
)
type Bank struct {
pending []func() error
......@@ -41,16 +43,17 @@ func (T *Bank) Wait() error {
return batch[0]()
}
ch := make(chan error, len(T.pending))
ch := make(chan error, len(batch))
for _, pending := range T.pending {
for _, pending := range batch {
go func(pending func() error) {
ch <- pending()
}(pending)
}
for i := 0; i < len(T.pending); i++ {
if err := <-ch; err != nil {
for i := 0; i < len(batch); i++ {
err := <-ch
if err != nil {
return err
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment