tiancaiamao
深入解析Go

Updated 3 years ago

g10guang (@g10guang) started discussion #33

2 years ago · 0 comments

Open

每个select都对应一个Select结构体。在Select数据结构中有个Scase数组,记录下了每一个case,而Scase中包含了Hchan。然后pollorder数组将元素随机排列,这样就可以将Scase乱序了。

channel (Edit this file)

如果只是实现了一次随机排列,是不是后续的 select 检查顺序就一样的?比如 for-select 结构

No description provided.

No comments on this discussion.


to join this conversation on GitBook. Already have an account? Sign in to comment
Notifications

You’re not receiving notifications from this thread.


1 participant