pub struct SharedServiceThread<S: Service> { /* private fields */ }
Expand description
This runs a service into a thread but, unlike ServiceThread
, it will use
an Arc<Mutex<S>>
so that the service object is also available as shared
memory.
This is mostly here for backwards compatibility and to make adoption easier:
start by using SharedServiceThread
and when all usage of the shared memory
have been removed, switch to ServiceThread
for a “pure actor”.
Implementations§
Auto Trait Implementations§
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more