hominee / crossbus

A Platform-less, Runtime-less Actor Computing Model
https://hominee.github.io/crossbus/
121 stars 0 forks source link

Async actor function? #1

Closed yiv closed 1 year ago

hominee commented 1 year ago

the short answer is yes, crossbus supports future routine. but to put it more precisely, crossbus follows a similar pattern to deal with future as actix/ yew. if you wanna run a async function

async fn run() {
    // do stuff here
}

you can

for a more general type like Stream, Message Stream, Delayed Timer or Blocking wait (sleep), crossbus has straight support for them, you can just follow the document or see the integration tests as a reference