-
Notifications
You must be signed in to change notification settings - Fork 4
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
fix #514, call_data_callbacks after shared the data #548
base: main
Are you sure you want to change the base?
Conversation
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.
Great feature to add. Thanks !
Not much is needed to merge this PR.
I think this feature would require a unit test. Could you add this?
pdi/src/pdi.cxx
Outdated
if ((status = PDI_share(v_name, v_data, v_access))) { | ||
break; | ||
|
||
Var_to_reclaim list_reclaim; |
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.
Add comment to explain what this does.
void* share(Ref ref, bool read, bool write) override; | ||
void* share(Ref ref, bool read, bool write, bool delayDataCallback = false) override; | ||
|
||
void data_callbacks() override; |
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.
Is this new method really needed ?
It is only used once. If the goal is to factorize calls to call_data_callbacks
, than it should be used everywhere where call_data_callbacks
is used.
pdi/src/pdi.cxx
Outdated
break; | ||
|
||
Var_to_reclaim list_reclaim; | ||
{ |
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.
{ |
I don't think this is needed
for (auto&& it = list_reclaim.begin(); it != list_reclaim.end(); it++) { | ||
Global_context::context().logger().trace("Multi expose: data events `{}' ({}/{})", it->c_str(), ++i, list_reclaim.size()); | ||
Global_context::context()[it->c_str()].data_callbacks(); | ||
} | ||
} |
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.
} |
for (auto&& it = list_reclaim.begin(); it != list_reclaim.end(); it++) { | ||
Global_context::context().logger().trace("Multi expose: data events `{}' ({}/{})", it->c_str(), ++i, list_reclaim.size()); | ||
Global_context::context()[it->c_str()].data_callbacks(); | ||
} | ||
} |
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.
} |
656e28b
to
3e1d45f
Compare
!!!INSERT YOUR DESCRIPTION HERE!!!
List of things to check before making a PR
Before merging your code, please check the following:
.clang-format
;Fix #issue
keyword to autoclose the issue when merged.