# \#chapter9

**URL:** https://forum.devtalk.com/tag/chapter9/2914.md

[Latest](https://forum.devtalk.com/latest.md) · [Categories](https://forum.devtalk.com/categories.md) · [Tags](https://forum.devtalk.com/tags.md)

---

## [Functional Programming in Java, Second Edition: Chapter 9, p.164 addendum to "parallel stream"](https://forum.devtalk.com/t/functional-programming-in-java-second-edition-chapter-9-p-164-addendum-to-parallel-stream/110230)

<div class="topic-metadata">

**Author:** [@dtonhofer](https://forum.devtalk.com/u/dtonhofer)\
**Replies:** 0\
**Last updated:** [23 May 2023 15:50 UTC](https://forum.devtalk.com/t/functional-programming-in-java-second-edition-chapter-9-p-164-addendum-to-parallel-stream/110230 "2023-05-23T15:50:53Z")

</div>

In Chapter 9, p.164 the stream is parallelized in 1 step. This inspired my to write some test some code to call a task “in parallel”: Not in parallel, inside a loop Using ThreadGroups (essentially ‘temporary worker po…

---

## [Functional Programming in Java, Second Edition: Chapter 9, p.165, "parallel streams"](https://forum.devtalk.com/t/functional-programming-in-java-second-edition-chapter-9-p-165-parallel-streams/109827)

<div class="topic-metadata">

**Author:** [@dtonhofer](https://forum.devtalk.com/u/dtonhofer)\
**Replies:** 0\
**Last updated:** [20 May 2023 11:28 UTC](https://forum.devtalk.com/t/functional-programming-in-java-second-edition-chapter-9-p-165-parallel-streams/109827 "2023-05-20T11:28:13Z")

</div>

A question to highlight is: Is there a way to make sure that a stream is NOT parallel, and make this evident in the code? As in: stream .assertNotParallel() .map(x -\> foo(x))... The idea would be to make it cle…
