actors: Handle messages/coroutines in want of reply and errors.
authorChristopher Allan Webber <cwebber@dustycloud.org>
Wed, 27 Apr 2016 22:08:34 +0000 (17:08 -0500)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Thu, 28 Apr 2016 14:18:07 +0000 (09:18 -0500)
If we call another method and we're "waiting" on a reply, and an error
happens in the other function so that it can't continue, that shouldn't
leave our coroutine hanging around in the waiting-coroutines hashmap
forever.  Instead, we raise it and throw an error warning about that.

(More ideally, we'd like to raise this inside of the send-message type
methods but that seems to cause a SIGABRT.  Yikes!)

* 8sync/systems/actors.scm (hive-reply-with-error): New method.
  (hive-process-message): Update call-catching-coroutine to reply with
  an eror if an uncaught exception happens.
  Update resume-waiting-coroutine to recognize whether the message
  has a '*reply* action or not.  If not, remove the coroutine (we'll
  never get a reply) and throw an error.


No differences found