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.
Overview Threads and locks are a software-defined formalization of the hardware underneath, and as such comprise the simplest possible concurrency model. It forms the basis of other concurrency abstractions built on top of it, so it’s important to understand in this regards. However, it’s difficult or impossible to build reliable, scalable systems directly on these primitives. While most every language has support for threads and locks, CPython remains special in its use of a global interpreter lock that prevents threads from concurrently accessing shared memory, because CPython’s memory management is not thread-safe.
C. Smith, B. Hendrickson, and E. Jessup. Applied linear algebra. Proceedings of the 5th SIAM conference, held
in Snowbird, UT, USA, page 361-365. Philadelphia, PA, (June 1994)
J. Izaguirre, S. Hampton, and T. Matthey. Journal of Parallel and Distributed Computing, 65 (8):
949--962(August 2005)my only none comparison of Multigrid to PME for MD.
W. Hasan, and R. Motwani. VLDB '95: Proceedings of the 21th International Conference on Very Large Data Bases, page 239--250. San Francisco, CA, USA, Morgan Kaufmann Publishers Inc., (1995)
H. chih Yang, A. Dasdan, R. Hsiao, and D. Parker. SIGMOD '07: Proceedings of the 2007 ACM SIGMOD international conference on Management of data, page 1029--1040. New York, NY, USA, ACM, (2007)
J. Li, H. Gao, J. Luo, S. Shi, and W. Zhang. SIGMOD '07: Proceedings of the 2007 ACM SIGMOD international conference on Management of data, page 899--909. New York, NY, USA, ACM, (2007)
M. Isard, M. Budiu, Y. Yu, A. Birrell, and D. Fetterly. EuroSys '07: Proceedings of the ACM SIGOPS/EuroSys European Conference on Computer Systems 2007, page 59--72. New York, NY, USA, ACM, (2007)
W. Han, J. Ng, V. Markl, H. Kache, and M. Kandil. SIGMOD '07: Proceedings of the 2007 ACM SIGMOD international conference on Management of data, page 809--820. New York, NY, USA, ACM, (2007)
M. Fernàndez, T. Jim, K. Morton, N. Onose, and J. Siméon. SIGMOD '07: Proceedings of the 2007 ACM SIGMOD international conference on Management of data, page 1159--1161. New York, NY, USA, ACM, (2007)
R. Fang, B. He, M. Lu, K. Yang, N. Govindaraju, Q. Luo, and P. Sander. SIGMOD '07: Proceedings of the 2007 ACM SIGMOD international conference on Management of data, page 1061--1063. New York, NY, USA, ACM, (2007)