You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
原文:Having main do all the priting ensures that output from each goroutine is processed as a unit, with no danger of interleaving if two goroutines finish at the same time.
The text was updated successfully, but these errors were encountered:
qzweng
changed the title
Sec.1.6 Fetching URLs Concurrently: meaning of "interleaving" 并发教程的翻译问题
Ch.1.6 Fetching URLs Concurrently: "interleaving" 并发教程的翻译问题
May 25, 2021
原文:Having
main
do all the priting ensures that output from each goroutine is processed as a unit, with no danger of interleaving if two goroutines finish at the same time.翻译:「这个程序中我们用main函数来接收所有fetch函数传回的字符串,可以避免在goroutine异步执行还没有完成时main函数提前退出。」
我认为 "interleaving" 的意思不是 “提前退出”,不是 "leave internally",而是「交错」的意思。建议翻译为:「使用 main 函数来打印每个 goroutine 的输出,保障了它们能被完整地处理,避免了因为有两个 goroutine 同时完成而使得其输出混淆在一起的危险。」
The text was updated successfully, but these errors were encountered: