add async.DelayedJob
kamilsk opened this issue · comments
job := async.NewDelayedJob(make([]func(), 0, 2))
if cond1 {
job.Do(...)
}
if cond2 {
job.Do(...)
}
job.Wait()
motivation: if cond1 is false, then no need to create a goroutine
🧰 Go packages.
kamilsk opened this issue · comments
job := async.NewDelayedJob(make([]func(), 0, 2))
if cond1 {
job.Do(...)
}
if cond2 {
job.Do(...)
}
job.Wait()
motivation: if cond1 is false, then no need to create a goroutine