Actors and Promises

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Actors and Promises

Eric MacAdie
Suppose you have an Actor that could return a Promise. My understanding is that to return a Promise, the Actor needs to call the replyIfExists() method, and the calling object needs to call the Actor's sendAndContinue() method. What happens if that Actor is called with send()?

Will the Promise still be created and sent? If so, will the JVM memory get piled up with unused Promise objects? I think one of the reasons a lot of Scala people moved from the built-in Scala Actor library to Akka was the built-in library was not garbage collecting the Actors, which was causing apps to crash.

= Eric MacAdie