MB
При компиляции получаю ошибку:
error[E0277]: `T` cannot be sent between threads safely
--> src/main.rs:78:20
|
78 | let addr = Actor::start_in_arbiter(&arbiter, |_| self);
| ^^^^^^^^^^^^^^^^^^^^^^^ `T` cannot be sent between threads safely
|
= note: required because of the requirements on the impl of `std::marker::Send` for `std::sync::Arc<T>`
= note: required because it appears within the type `Data<T>`
= note: required because it appears within the type `MyActor<T>`
= note: required because it appears within the type `[closure@src/main.rs:78:54: 78:62 self:MyActor<T>]`
= note: required by `actix::Actor::start_in_arbiter`
help: consider further restricting this bound
|
61 | impl<T: Unpin + 'static + std::marker::Send> MyActor<T> {
