Very interesting article came out recently. 
https://www.infoq.com/articles/java-virtual-threads/ and it has implications 
for the Go context discussion and the author makes a very good case as to why 
using the thread local to hold the context - rather than coloring every method 
in the chain is a better approach. If the “virtual thread aka Go routine” is 
extremely cheap to create you are far better off creating one per request than 
pooling - in fact pooling becomes an anti pattern. If you are creating one per 
request then the thread/routine becomes the context that is required. No need 
for a distinct Context to be passed to every method. 

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/1353D084-58D1-4586-B0F9-1A1A9669ED24%40ix.netcom.com.

Reply via email to