Skip to content

Commit

Permalink
Update taskset.go
Browse files Browse the repository at this point in the history
  • Loading branch information
lenonqing authored Jun 30, 2021
1 parent 83e2ca5 commit d6e6ad2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion taskset.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package boomer

import (
"context"
"math/rand"
"sync"
"time"
Expand Down Expand Up @@ -103,5 +104,5 @@ func (ts *WeighingTaskSet) Run() {
r := rand.New(rand.NewSource(time.Now().UnixNano()))
roll := r.Intn(ts.offset)
task := ts.GetTask(roll)
task.Fn()
task.Fn(context.Background())
}

0 comments on commit d6e6ad2

Please sign in to comment.