in ,

LeonHartley / Coerce-rs, Hacker News

LeonHartley / Coerce-rs, Hacker News


                    

        

Coerce-rs is an asynchronous (async / await) Actor runtime for Rust. It allows for extremely simple yet powerful actor-based multithreaded application development.

Mutex

,RwLocketc).

Coerce uses Tokio’s MPSC channels (tokio :: sync :: mpsc :: channel), every actor created spawns a task listening to messages from aReceiver, handling and awaiting the result of the message. Every reference (ActorRef, which can be cloned.

Actors can be stopped and actor references can be retrieved by ID (currentlyUuid) from anywhere in your application. Actors are automatically dropped (andStopped) when all references are dropped.

Example

pub

************** (struct) ****************************************** EchoActor
{ }  # [async_trait]

for**************** (EchoMessage********************** {     

type
Result=String

************** ()     } }

async  (fn****************  run  () {     ********************** unwrap
();      

())).

Distributed Actors currently in development  ************************************************ (Read More) ******************************************

What do you think?

Leave a Reply

Your email address will not be published. Required fields are marked *

GIPHY App Key not set. Please check settings

A Repeat Win for Trump in 2020 Could Mean 'Tax Cuts 2.0,' Says Wells Fargo, Crypto Coins News

A Repeat Win for Trump in 2020 Could Mean 'Tax Cuts 2.0,' Says Wells Fargo, Crypto Coins News

I grew Visa List to $ 5k per month in a year, Hacker News