Replacement for SendWorkAsync?
vmarkovtsev opened this issue · 3 comments
vmarkovtsev commented
The new Pool
does not provide a way to submit jobs asynchronously. I need this ProcessAsync
.
Jeffail commented
Hey @vmarkovtsev, depending on how you used the method it ought to be simple enough to do something like this:
go func() {
foo := pool.Process(5)
// Insert here the logic you previously had inside the callback
}()
The old Async methods were basically just doing that under the hood.
vmarkovtsev commented
Right, this should work for me, thanks.
wpecker commented
@vmarkovtsev I realize that asynchronous pool, with cache