Hi,

I took the liberty of creating what I think you're trying to achieve in the 
go playground so I could test: https://play.golang.org/p/IgtSUNLakJ

Are you expecting the output of the two goroutines to be run in parallel so 
you get the output 1 2 3 4 5 6?

Cheers

On Friday, September 2, 2016 at 1:07:32 PM UTC-4, Ринат Галиев wrote:
>
> Я не могу заставить работать попеременно 2 gorutines:
> не использовать новый imports
> использовать каналы
> получить результаты: 1 2 3 4 5 6
> согte after "// Красноломкий "
>
> Основной пакет
>
>  // красноломкий
>
> импорт "Время"
>
>  
>
> FUNC главный () {
>
> идти FUNC () {
>
> для _, значение: = диапазон [] INT {1, 3, 5} {
>
> // красноломкий
>
> Println (значение)
>
> // красноломкий
>
> }
>
> }()
>
>  
>
> идти FUNC () {
>
> для _, значение: = диапазон [] INT {2, 4, 6} {
>
> // красноломкий
>
> Println (значение)
>
> // красноломкий
>
> }
>
> }()
>
>  
>
>
>  
>
> time.Sleep (time.Second)
>
> }
>

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