Skip to content

CallbackList API #7361

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

Merged
merged 1 commit into from
Jun 8, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
API change to faciliate executer to know the number of active callbacks
  • Loading branch information
hreintke committed Jun 8, 2020
commit c0d032e91b6ec21bcf60b04b5cfcc393700560a9
3 changes: 2 additions & 1 deletion cores/esp8266/CallBackList.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class CallBackList
}

template<typename... Args>
void execute(Args... params) {
int execute(Args... params) {
for(auto it = std::begin(callBackEventList); it != std::end(callBackEventList); ) {
CallBackHandler &handler = *it;
if (handler->allowRemove() && handler.unique()) {
Expand All @@ -75,6 +75,7 @@ class CallBackList
++it;
}
}
return callBackEventList.size();
}
};

Expand Down