-
Notifications
You must be signed in to change notification settings - Fork 248
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
GH-154: Lazy & RescheduleLazy migrate to LazyBase #155
Conversation
a9fcbc5
to
1815c81
Compare
dd6a65f
to
30e1ede
Compare
FIXME: testLazyPerf caused by #156 . |
This reverts commit 94b2f39.
explicit LazyBase(Handle coro) : _coro(coro) {} | ||
LazyBase(LazyBase&& other) : _coro(std::move(other._coro)) { | ||
other._coro = nullptr; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
构造函数做成 protected 的会比较好,LazyBase 不应该可以被直接构造
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LazyBase
定义在命名空间 detail
内部,用户不应使用。
若把构造函数放在 protected
里面,由于 protected
构造函数无法被继承,将导致派生类全部要重新声明一遍,再委派给 LazyBase
。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmmm,detail namespace 算弱约束吧,不过我不算很纠结这个
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rest,lgtm
另外你需要签署 CLA 协议我们才能合入你的代码 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks.
Why
Closes #154
Lazy
andRescheduleLazy
migrate toLazyBase
.What is changing
Example