Begin forwarded message:
> From: Ian Lance Taylor <i...@golang.org>
> Date: January 16, 2019 at 9:29:59 AM CST
> To: Robert Engels <reng...@ix.netcom.com>
> Subject: Re: [go-nuts] what is the use of context in golang RESTful apis?
>
> This just came to me, not to the mailing list. Was that a mistake?
>
> Ian
>
>> On Wed, Jan 16, 2019 at 7:15 AM Robert Engels <reng...@ix.netcom.com> wrote:
>>
>> I don’t see the complexity nor the real difference between Go routines and
>> Threads. In Java TLS is not passed to new threads you need to be explicit.
>> The ThreadLocal doesn’t allow access to other threads locals even with
>> thread groups, etc. As far as I understand Go has no concept of parent Go
>> routine - at least not exposed - so I don’t see the issue.
>>
>> Can you maybe give an example of where ThreadLocal type implementation is
>> confusing?
>>
>>>> On Jan 16, 2019, at 9:00 AM, Ian Lance Taylor <i...@golang.org> wrote:
>>>>
>>>> On Wed, Jan 16, 2019 at 5:39 AM Robert Engels <reng...@ix.netcom.com>
>>>> wrote:
>>>>
>>>> A big difference of opinion here. TLS as implemented in Java via
>>>> ThreadLocal is trivial to use, understand, and is pervasive. In C++ its a
>>>> different story.
>>>
>>> A general form of TLS is much more confusing in a language where it's
>>> trivial to start a goroutine. To be at all useful we have to start
>>> talking about how and when goroutines inherit TLS values from their
>>> parent goroutine. Then we need to control that. It's a pile of
>>> complexity we don't need. Better to be explicit. In my opinion.
>>>
>>> Ian
>>
--
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.