Performing side effects on Publisher

前端 未结 1 1603
深忆病人
深忆病人 2021-01-26 10:31

I\'m trying to perform side effect on Publisher, and I can\'t find any operator which will allow me to do something like this. To be precise, I\'m looking for a con

相关标签:
1条回答
  • 2021-01-26 11:18

    You might be looking for the .handleEvents operator. You can implement it with any of five different parameters; they are all optional, so implement just those you need. Both an error and a completion would count as receiveCompletion:.

    Note that the error will still flow on down the pipeline if you don't catch it! (The completion will flow down the pipeline in any case, and I don't think you can stop it.)

    0 讨论(0)
提交回复
热议问题