Akka.NET 中的 Actor 被設計成一次只能處理一個訊息,套 async/await 都沒屁用,都必須等當前的訊息處理完畢才會從 Mailbox 接收下一個訊息。
⠀
不過可以將訊息丟給一個 Task 之後就不理它,但是這就跟 Akka.NET 脫勾了,底下有一個解法是用 PipeTo 這個擴充方法來模擬非同步呼叫的效果。
⠀
--
How to Do Asynchronous I/O with Akka.NET Actors Using PipeTo
https://petabridge.com/blog/akkadotnet-async-actors-using-pipeto/
⠀
--
Akka.NET PipeTo Sample
https://github.com/petabridge/akkadotnet-code-samples/tree/master/PipeTo
⠀
--
Exception Handling with akka.net PipeTo() on Task
https://stackoverflow.com/questions/48803038/exception-handling-with-akka-net-pipeto-on-task
「async i o」的推薦目錄:
- 關於async i o 在 軟體廚房 Facebook 的最佳貼文
- 關於async i o 在 smol-rs/async-io: Async I/O and timers - GitHub 的評價
- 關於async i o 在 Getting Started - Asynchronous Programming in Rust 的評價
- 關於async i o 在 How does asyncio actually work? - Stack Overflow 的評價
- 關於async i o 在 An Introduction to Python AsyncIO — wildcardcorp.com 的評價
async i o 在 Getting Started - Asynchronous Programming in Rust 的推薦與評價
If you're looking to start writing asynchronous Rust code, you've come to the right ... The early chapters provide an introduction to async programming in ... ... <看更多>
async i o 在 smol-rs/async-io: Async I/O and timers - GitHub 的推薦與評價
For concrete async networking types built on top of this crate, see async-net . Implementation. The first time Async or Timer is used, a thread named "async-io" ... ... <看更多>