title: Incremental processing in an akka actor
body: <p>I have actors that need to do very long-running and computationally expensive work, but the computation itself can be done incrementally. So while the complete computation itself takes hours to complete, the intermediate results are actually extremely useful, and I'd like to be able to respond to any requests of them. This is the pseudo code of what I want to do:</p>
  
  <pre><code>var intermediateResult = ...
  loop {
       while (mailbox.isEmpty &amp;&amp; computationNotFinished)
         intermediateResult = computationStep(intermediateResult)
  
  
       receive {
           case GetCurrentResult =&gt; sender ! intermediateResult
           ...other messages...
       }
   }
  </code></pre>