For Stream.generate(foo).parallel(), does foo have to be thread safe?

I’m working with Java 8 Streams. I have a custom function, foo(), that yields an object, and I would like to parallel stream the objects it creates. I know foo() is not thread safe.

If I write Stream.generate(foo).parallel(), will foo() be called in an asynchronous manner? I.e. will objects be generated serially, and passed to parallel threads, or will multiple threads each generate objects as needed by calling foo()?