so why are channels and goroutines built into the language proper?

On Monday, October 17, 2016 at 9:42:17 AM UTC-4, adon...@google.com wrote:
>
> On Sunday, 16 October 2016 08:40:32 UTC-4, Sokolov Yura wrote:
>>
>> "future" is commonly used synchronization abstraction.
>>
>> It could be implemented in a library, using mutex, channel and interface.
>> Example: 
>> https://github.com/Workiva/go-datastructures/blob/master/futures/selectable.go
>>  
>> <https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2FWorkiva%2Fgo-datastructures%2Fblob%2Fmaster%2Ffutures%2Fselectable.go&sa=D&sntz=1&usg=AFQjCNErWyxHIbetA_9_Su3al1T2kxM9tQ>
>>
>
> If it can be implemented as a library, why build it in to the language? 
>  You don't need futures very often---far less than, say, Mutex, and mutexes 
> aren't built into the language either.
>
>

-- 
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