About Question enthuware.ocpjp.v8.2.1897 :

All the posts and topics that contain only an error report will be moved here after the error is corrected. This is to ensure that when users view a question in ETS Viewer, the "Discuss" button will not indicate the presence of a discussion that adds no value to the question.

Moderators: Site Manager, fjwalraven

Post Reply
mrmuiz
Posts: 49
Joined: Mon Jul 27, 2015 4:34 am
Contact:

About Question enthuware.ocpjp.v8.2.1897 :

Post by mrmuiz »

Making the stream parallel will cause the filter operations to be processed by multiple threads. Making it sequential again will assure that the elements in the final stream will have the same order as the original.
When I read this the first time I thought that the whole stream was going to operate in a parallel way (multiple threads in parallel) until a call to sequential() happens.

I made some tests, and seems like having both parallel() and sequential() is actually like not having anything at all, becase the whole stream will be sequential (no multithreading involved): the last statement, sequential in this case, will overwrite the previously defined behavior (parallel) affecting all the intermediate operations.

Correct me if I'm wrong, maybe description here is a bit misleading, because in fact no multithreading is involved in filter operations.
Last edited by mrmuiz on Thu Dec 24, 2015 6:26 am, edited 1 time in total.

admin
Site Admin
Posts: 10400
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocpjp.v8.2.1897 :

Post by admin »

You are right. The explanation has been updated to make it clear.
thank you for your feedback!
Paul.

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests