Doubt
eullerpereira94 opened this issue · 1 comments
Hi I'm a newbie in Go, so I don't know what is the difference between using Tunny in a synchronous way or an asynchronous way?
Hey @euller88,
Synchronous would mean that the call to a tunny pool will finish when the result is ready. When you call result, err := pool.SendWork(data)
this line will stop until result
has the resulting data ready for use. An asynchronous call, however, is finished immediately and without the result, but when we make the call we define the action that should be done when the result is ready.
I recommend taking a look at http://talks.golang.org/2012/concurrency.slide#1, it's a good run through of concurrency within Go. Since Go has great tools for parallel and asynchronous programming built into the language the chances are your code will be simpler without using Tunny at all.