Skip to content

Commit

Permalink
handle panic
Browse files Browse the repository at this point in the history
  • Loading branch information
hoanguyenkh committed Sep 21, 2024
1 parent 3ca71f6 commit 864cbb2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ func FromConcPool(p *conc.Pool) Pool {

func FromAntsPool(p *ants.Pool) Pool {
return wrapFunc(func(f func()) {
p.Submit(f)
if err := p.Submit(f); err != nil {
panic(err)
}
})
}

0 comments on commit 864cbb2

Please sign in to comment.