Integrating Java 8 Streams with The Real-Time Specification for Java
Hai Tao Mei, Ian Gray, Andy J. Wellings · 2015
The paper investigates the use of the Java 8 stream processing facilities within the context of the Real-Time Specification for Java. Java 8 stream processing uses the Java 7 Fork/Join framework. We demonstrate that it is not possible, with the current framework, to supply a pool of real-time worker threads with which to perform stream evaluation. We show what changes would need to be made to the framework for it to be used in a real-time context. Our evaluation shows that without such changes, use of the current Java 8 stream processing faculties by real-time threads can result in significant priority inversions. We also consider what hooks the RTSJ would need to allow real-time Fork/Join pools to be generated without changes to the source code.