I have a Stream as a method's argument. I don't know if it parallel or not. How can I guarantee sequential execute it?
(no if/else/instance of pls)
Thanks
wait... just invoke sequential() on it?
This is just a flag so the last invocation of sequential/parallel wins, that means even if your stream is parallel and you receive it as a method argument, just invoke sequential anywhere before the terminal operation and you are done
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With