Skip to content

tideland/rust-actor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tideland Rust Actor

GitHub release GitHub license

Description

Tideland Rust Actor provides running backend Tokio threads for the sequential execution of closures following the actor model. It allows to do asynchronous and synchronous calls easily into an own context. The type actor.AsyncActor is simply processing the closure ony by one and this way removes the need for mutexes and channels. The actor.MultiActor is doing the same but allows to additionaly wait for the processing of a sent closure.

I hope you like it. ;)

Example

use actor::AsyncActor;

fn main() {
    let actor = AsyncActor::new();
    let _ = actor
        .send(|| {
            println!("Hello from actor!");
            Ok(())
        })
        .await;
}

Contributors

About

A library to process closures enqueued asynchronous or synchronously waiting for its enqueued closure to be executed.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages