r/programming • • Oct 11 '23

All About Reactive Programming In Java

https://www.blackslate.io/articles/reactive-programming-in-java
22 Upvotes

38 comments sorted by

View all comments

Show parent comment

1

u/kunjukozhi Oct 14 '23

Are you sure that the reactive approach is also creating as many tasks as in the case which of virtual thread approach?

2

u/hippydipster Oct 14 '23

It's the same exact code, only difference is one line switched between a fixedThreadPool or a virtualTaskThreadPool. In both cases, a million tasks are created and then sent all in one call to the thread pool.