Skip to content

Commit 7346754

Browse files
authored
API change to faciliate executer to know the number of active callbacks (#7361)
1 parent 83523c0 commit 7346754

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cores/esp8266/CallBackList.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class CallBackList
6464
}
6565

6666
template<typename... Args>
67-
void execute(Args... params) {
67+
int execute(Args... params) {
6868
for(auto it = std::begin(callBackEventList); it != std::end(callBackEventList); ) {
6969
CallBackHandler &handler = *it;
7070
if (handler->allowRemove() && handler.unique()) {
@@ -75,6 +75,7 @@ class CallBackList
7575
++it;
7676
}
7777
}
78+
return callBackEventList.size();
7879
}
7980
};
8081

0 commit comments

Comments
 (0)