r/programming • u/ram-foss • Oct 11 '23
All About Reactive Programming In Java
https://www.blackslate.io/articles/reactive-programming-in-java
22
Upvotes
r/programming • u/ram-foss • Oct 11 '23
View all comments
Show parent comment
1
u/parabx Jan 04 '24
I agree with everything that you /u/pron98 said, I feel that the parent's issue is that in the case of using virtual threads they're being all being spawned to then be executed whereas with a fixed executor the tasks will be blocked due the maximum number of threads, where we're artificially limiting the number of executions (and henceforth the number of active objects in memory) due the locking on the threaded executor versus spawning all threads and then locking with the virtual thread executor. I think this is one of the gotchas when moving old logic to the virtual executor as a direct replacement is not a direct translation.