{"action":"created","issue":{"url":"https://api.github.com/repos/akkadotnet/akka.net/issues/700","labels_url":"https://api.github.com/repos/akkadotnet/akka.net/issues/700/labels{/name}","comments_url":"https://api.github.com/repos/akkadotnet/akka.net/issues/700/comments","events_url":"https://api.github.com/repos/akkadotnet/akka.net/issues/700/events","html_url":"https://github.com/akkadotnet/akka.net/pull/700","id":59416752,"number":700,"title":"Async Await support w/o performance hit and TypedActor/UntypedActor support","user":{"login":"rogeralsing","id":647031,"avatar_url":"https://avatars.githubusercontent.com/u/647031?v=3","gravatar_id":"","url":"https://api.github.com/users/rogeralsing","html_url":"https://github.com/rogeralsing","followers_url":"https://api.github.com/users/rogeralsing/followers","following_url":"https://api.github.com/users/rogeralsing/following{/other_user}","gists_url":"https://api.github.com/users/rogeralsing/gists{/gist_id}","starred_url":"https://api.github.com/users/rogeralsing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rogeralsing/subscriptions","organizations_url":"https://api.github.com/users/rogeralsing/orgs","repos_url":"https://api.github.com/users/rogeralsing/repos","events_url":"https://api.github.com/users/rogeralsing/events{/privacy}","received_events_url":"https://api.github.com/users/rogeralsing/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":16,"created_at":"2015-03-01T20:50:51Z","updated_at":"2015-03-10T11:42:47Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/akkadotnet/akka.net/pulls/700","html_url":"https://github.com/akkadotnet/akka.net/pull/700","diff_url":"https://github.com/akkadotnet/akka.net/pull/700.diff","patch_url":"https://github.com/akkadotnet/akka.net/pull/700.patch"},"body":"### This is for review only.\r\n\r\nThis PR removes the need to use the special \"task-dispatcher\" for async await inside ReceiveActor.\r\nIf the receive handler is an async method, it will apply the correct scheduling mechanics for that handler only.\r\n\r\nThis PR also introduces the `RunTask` method inside `UntypedActor` (possibly it should be in `ActorBase`)\r\nThis method lets you run tasks within the ActorTaskScheduler.\r\n\r\nThis does however not address \"reentrancy\", messages can still be processed during await periods (but never in parallell)\r\nBut this could easily be handled by extending how RunActor behaves, e.g. an argument for if reentrancy is allowed or not, and if not, suspend the mailbox.\r\n\r\nThe idea behind `RunTask` is that it allows you to run any task, or multiple tasks, within the safety of the ActorTaskScheduler. this means that reading and writing state is safe both using async/await and continueWith.\r\n\r\ncc. @nvivo "},"comment":{"url":"https://api.github.com/repos/akkadotnet/akka.net/issues/comments/78038131","html_url":"https://github.com/akkadotnet/akka.net/pull/700#issuecomment-78038131","issue_url":"https://api.github.com/repos/akkadotnet/akka.net/issues/700","id":78038131,"user":{"login":"rogeralsing","id":647031,"avatar_url":"https://avatars.githubusercontent.com/u/647031?v=3","gravatar_id":"","url":"https://api.github.com/users/rogeralsing","html_url":"https://github.com/rogeralsing","followers_url":"https://api.github.com/users/rogeralsing/followers","following_url":"https://api.github.com/users/rogeralsing/following{/other_user}","gists_url":"https://api.github.com/users/rogeralsing/gists{/gist_id}","starred_url":"https://api.github.com/users/rogeralsing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rogeralsing/subscriptions","organizations_url":"https://api.github.com/users/rogeralsing/orgs","repos_url":"https://api.github.com/users/rogeralsing/repos","events_url":"https://api.github.com/users/rogeralsing/events{/privacy}","received_events_url":"https://api.github.com/users/rogeralsing/received_events","type":"User","site_admin":false},"created_at":"2015-03-10T11:42:47Z","updated_at":"2015-03-10T11:42:47Z","body":"The `ActorTaskScheduler` now runs tasks inline if possible.\r\nThus no overhead except for some GC pressure and a few jumps when working with tasks that are not IO bound."}}