Add a new action at the end of the new observable that is returned.
More...
Go to the source code of this file.
Add a new action at the end of the new observable that is returned.
- Template Parameters
-
LastCall | the type of the action function |
- Parameters
-
- Returns
- Observable that emits the same items as the source observable, then invokes the given action.
- Sample Code\n
finally([](){
printf("The final action\n");
});
values.
[](int v){printf("OnNext: %d\n", v);},
[](){printf("OnCompleted\n");});
OnNext: 1
OnNext: 2
OnNext: 3
OnCompleted
The final action
If the source observable generates an error, the final action is still being called:
finally([](){
printf("The final action\n");
});
values.
[](int v){printf("OnNext: %d\n", v);},
},
[](){printf("OnCompleted\n");});
OnNext: 1
OnNext: 2
OnNext: 3
OnError: Error
from source
The final action
◆ RXCPP_OPERATORS_RX_FINALLY_HPP
#define RXCPP_OPERATORS_RX_FINALLY_HPP |
auto range(T first=0, T last=std::numeric_limits< T >::max(), std::ptrdiff_t step=1) -> observable< T, detail::range< T, identity_one_worker >>
Definition: rx-range.hpp:119