The whole purpose of streaming programs is the asynchronous operation of threads. This is how you get performance gains, because different tasks can run on different CPUs / cores at the same time, without having to synchronize with each other. To force this type of synchronized blocking output signal, by definition, cause threads to do something atypical.
Answer
@Martin provides alternatives to make it work.
source share