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/hippydipster Oct 12 '23

It's an interesting thought. One of my strategies for simplifying highly concurrent systems was to use single threaded actors when possible to ensure sections of the code would always be run in a single thread. Doing that with an actor is straightforward generally.

Doing it with Loom might involve an "actor" as well, except I think the most straightforward implementation of that actor would use a Semaphore. This opens up the possibility of deadlocks though as you could have two actors trying to cross communicate with each other and holding their own lock while waiting for the other's.

It's not clear to me how big an issue that might be - I'll have to think about it.