-
Notifications
You must be signed in to change notification settings - Fork 0
Description
While Calculon already uses the Async Method Pattern that async/await relies on, simply marking an actor method async may not work, since we won't be invoking it in the traditional way and even if that works, the await would run on a scheduler thread, i.e. the mailbox dispatcher would consider the method to be finished as soon as the first await is hit and the rest would be executed by the scheduler. Somehow we need to get these continuations to execute as messages in the mailbox. Chances are that a custom implementation of the async state machine will required
Jon Skeet's EduAsync project should be a good starting point for this:
http://msmvps.com/blogs/jon_skeet/archive/tags/Eduasync/default.aspx
The dispatch should use the same mechanism created in #3