I admit that I probably read into that based on the historical use of 
ThreadLocals to carry context in traditional ‘request is a thread’ systems. I 
think as Axel pointed out it is more explicit in the ’structured concurrency’ 
paper.

In Java the Thread has always carried context - it is used in security, 
logging, debugging, etc. The availability of millions of threads is not going 
to change that - as outlined in the first paper.

Anyway, I am glad you found it interesting.

> On Oct 1, 2022, at 9:33 AM, Juliusz Chroboczek <j...@irif.fr> wrote:
> 
>> Very interesting article came out recently.
>> https://www.infoq.com/articles/java-virtual-threads/
> 
> Interesting article, thanks for the pointer.
> 
>> 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.
> 
> I didn't read that in the article, but then I may be missing something.
> My takeaway is that:
> 
>  - with M:N threds, one must be careful to not stash too much data in
>    thread local storage, since there may be large numbers of threads;
> 
>  - with M:N threads, there's no need to do use thread pools; in the
>    absence of thread pools, thread-local storage is more useful, since
>    there's no risk of leaking thread-local data to a different task.
> 
> This implies to me that there is an interesting tradeoff, but does not
> by itself argue against Go's design.
> 
> -- Juliusz
> 
> -- 
> 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/87k05jpqae.fsf%40pirx.irif.fr.

-- 
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/3DC80551-BBBF-4B54-BEEB-E76DC0C05CC1%40ix.netcom.com.

Reply via email to