I came up with piece of code to use runtime.Gosched for batching multiple 
requests  "auto-magically" from the client side. 

https://play.golang.org/p/QK1wbtgVLf

It works and it is actually very useful for many scenarios, but I wonder if 
this is a good/bad way of doing stuff like this, or is there a better/more 
proper way to do it.

(I know the actual scheduling behavior is not defined, but I don't need the 
request to be strictly batched, just some degree of batching better than 
none.)

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to