Jeffail / tunny

A goroutine pool for Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Replacement for SendWorkAsync?

vmarkovtsev opened this issue · comments

The new Pool does not provide a way to submit jobs asynchronously. I need this ProcessAsync.

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.

Right, this should work for me, thanks.

@vmarkovtsev I realize that asynchronous pool, with cache

https://github.com/penhauer-xiao/gpool