在通道中写入多个go例程时是否必须锁定

在通道中写入多个go例程时是否必须锁定

问题描述:

Do I have to lock if two go routines write into the same channel or is this automatically handled by go?

如果两个go例程写入同一通道,还是必须由go自动处理,我是否必须锁定? p> div>

Channels are safe, it's built in.