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

introduce ReaderManager to address race condition in smaller critical #220

Merged
merged 1 commit into from
Jul 12, 2020

Conversation

jschwinger233
Copy link
Member

解决了三点:

  1. 可以对 DeployOptions 进行浅拷贝, mutex 在 DeployOptions 的 map 的值里, 值是一个 interface, map 和 interface 都是引用类型, 浅拷贝传递引用
  2. 临界区 (critical section) 更小, 上一个 PR 里一个 mutex 管理所有 send file, 这是不准确的做法, 应该是一个 file 一个 mutex
  3. mutex 被封装在 ReaderManager 里了, 不暴露 mutex 是更好的

@jschwinger233 jschwinger233 changed the title introduce ReaderManager to address race condition in smaller critical [WIP] introduce ReaderManager to address race condition in smaller critical Jul 12, 2020
@jschwinger233 jschwinger233 changed the title [WIP] introduce ReaderManager to address race condition in smaller critical introduce ReaderManager to address race condition in smaller critical Jul 12, 2020
@CMGS CMGS merged commit 59d9065 into projecteru2:master Jul 12, 2020
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.

2 participants