Switching the stream from parallel() to sequential() worked in the initial Stream API design, but caused many problems and finally the implementation was changed, so it just turns the parallel flag on and off for the whole pipeline. The current documentation is indeed vague, but it was improved in Java-9:
The stream pipeline is executed sequentially or in parallel depending on the mode of the stream on which the terminal operation is invoked. The sequential or parallel mode of a stream can be determined with the BaseStream.isParallel() method, and the stream's mode can be modified with the BaseStream.sequential() and BaseStream.parallel() operations. The most recent sequential or parallel mode setting applies to the execution of the entire stream pipeline.
Dynamic Networks Everything I described so far is common to CSP (Communicating Sequential Processes) and the Actor model. Here’s what makes actors more general: Connections between actors are dynamic. Unlike processes in CSP, actors may establish communication channels dynamically. They may pass messages containing references to actors (or mailboxes). They can then send messages to those actors. Here’s a Scala example: receive { case (name: String, actor: Actor) => actor ! lookup(name) } The original message is a tuple combining a string and an actor object. The receiver sends the result of lookup(name) to the actor it has just learned about. Thus a new communication channel between the receiver and the unknown actor can be established at runtime. (In Kilim the same is possible by passing mailboxes via messages.)
{. Schouten, {. Bueno, W. Duivesteijn, and M. Pechenizkiy. Data Mining and Knowledge Discovery, 36 (1):
379--413(January 2022)Funding Information: This research is supported by EDIC project funded by NWO. We thank the EDIC consortium and the ZGT hospital for allowing us to analyse the data from the DIALECT-2 study. We especially thank Niala Den Braber (PhD candidate at Universiteit Twente and researcher internal medicine at ZGT hospital) and prof. dr. Goos Laverman (internist-nephrologist at ZGT hospital) for giving us clinical valuation of our findings. In addition, we thank our colleagues dr. Robert Peharz for giving us useful insights on Markov chains and DBNs and dr. Maryam Tavakol for guiding us towards the MovieLens dataset..
F. Lemmerich, M. Becker, P. Singer, D. Helic, A. Hotho, and M. Strohmaier. Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, page 965–974. New York, NY, USA, Association for Computing Machinery, (2016)
A. Yan, S. Cheng, W. Kang, M. Wan, and J. McAuley. Proceedings of the 28th ACM International Conference on Information and Knowledge Management, (2019)
E. Fischer, D. Zoller, A. Dallmann, and A. Hotho. KI 2020: Advances in Artificial Intelligence, 12325, page 275-282. Cham, Springer International Publishing, (2020)