Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Перевод content/moretypes.article и content/concurrency.article. Нужна проверка. #11

Merged
merged 3 commits into from
Feb 13, 2018

Conversation

dmpichugin
Copy link

No description provided.

@dmpichugin dmpichugin changed the title Перевод content/more-types.article. Нужна проверка. Перевод content/moretypes.article и content/concurrency.article. Нужна проверка. Mar 16, 2017
@@ -1,106 +1,139 @@
Concurrency
Go provides concurrency constructions as part of the core language. This lessons presents them and gives some examples on how to use it.
Параллельность
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Сейчас понабегут говорить про то, что concurrency -- это, строго говоря, не совсем параллельность :)
Я бы перевела как "конкурентность", но можно обсудить.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Привет @rumyantseva, я думаю, что в этом контексте это как раз означает "Параллельность"

Если это, конечно, еще актуально

Concurrency
Go provides concurrency constructions as part of the core language. This lessons presents them and gives some examples on how to use it.
Параллельность
Конструкции для параллельного программирования являются частью языка Go. Эти уроки рассказывают о них и дают некоторые примеры того, как ими пользоваться.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Частью языка Go -- предлагаю "частью ядра языка Go".
Эти уроки -- все таки в оригинале, скорее всего, имелся в виду "этот урок".


Channels are a typed conduit through which you can send and receive values with the channel operator, `<-`.
Канал является типизированным средством передачи, через которое можно посылать и получать значения с помощью оператора канала, `<-`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Если совсем строго, то надо в мн. ч. -- каналы являются...
Вместо посылать я бы выбрала "отправлять" :)


Channels can be _buffered_. Provide the buffer length as the second argument to `make` to initialize a buffered channel:
Каналы могут быть _буферизированным_. Для инициализации буферизированного канала передайте в качестве второго аргумента функции `make` длину буфера канала:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_буферизированным_ -> _буферизированными_


ch := make(chan int, 100)

Sends to a buffered channel block only when the buffer is full. Receives block when the buffer is empty.
Отправка в буферизированный канал блокируется только при заполнении буфера. Получение из канала блокируется при его полном опустошении.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Отправка блокируется... Получение блокируется"

По смыслу я бы написала "отправка блокирует свою горутину только при...", "получение из канала блокирует свою горутину при..." Как-то так что ли... Чтобы было понятно, кто кого блокирует.


A `select` blocks until one of its cases can run, then it executes that case. It chooses one at random if multiple are ready.
Оператор `select` блокирует, пока один из case не запустится, затем он выполнит этот case. Если готовы несколько case, то выбирается случайный.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Я бы опять добавила для наглядности блокирует -> блокирует свою горутину

}

.play concurrency/default-selection.go

* Exercise: Equivalent Binary Trees
* Упражнение: Равенство двоичных деревьев
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

двоичных деревьев ->бинарных деревьев? вроде, устоявшееся выражение :)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

В литературе нет разницы


.play concurrency/exercise-equivalent-binary-trees.go

* sync.Mutex

We've seen how channels are great for communication among goroutines.
Мы увидели, как каналы прекрасно подходят для связи между горутинам.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

для связи между горутинам -> "для общения между горутинами"


Function values may be used as function arguments and return values.
Функции могут быть использованы в качестве аргументов функции и значением возврата.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

в качестве аргументов функции и значением возврата -> "в качестве аргументов функции и возвращаемого значения"

@rumyantseva
Copy link
Member

Issue #9, issue #5

@dmpichugin
Copy link
Author

dmpichugin commented Mar 21, 2017

Исправил.

@rumyantseva rumyantseva merged commit 019cff8 into golang-ru:master Feb 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants