更新时间:2022-05-16 07:58:04
消息接收是原子操作.
如果您对完成方法感兴趣,请阅读VM的源代码.如果简化一下,发送过程将执行以下步骤:
If you are interested how it is done, read the source code of VM. If I simplify it, the sending process is doing those steps:
如您所见,复制是在关键部分之外(之前)完成的,并且关键部分的速度非常快.只是在玩弄很少的指针.
As you can see, copying is done outside (before) critical section and the critical section is pretty fast. It is just juggling with few pointers.