The peek and forEach consumers for both CacheStream and LockedStream can be ran on non blocking threads. Since these consumers are designed with blocking API in mind they may very well invoke methods that will block the current thread.
We should either make sure that these consumers never invoke blocking methods or possibly run these methods in a blocking thread and resume again on a non blocking thread.
- relates to
ISPN-10309 Convert Remaining Parts to Non Blocking & Reduce Thread Pools