Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate possiblility of removing inner Arc in MessageContent. #66

Closed
rsimmonsjr opened this issue Aug 29, 2019 · 1 comment
Closed

Comments

@rsimmonsjr
Copy link
Owner

This is an issue for efficiency and simplification. Currently the MessageContent type looks like the following:

pub enum MessageContent {
    /// The message is a local message.
    Local(Arc<dyn ActorMessage + 'static>),
    /// The message is from remote and has the given hash of a [`std::any::TypeId`] and the
    /// serialized content.
    Remote(Vec<u8>),
}

Note that the local message is holding the content inside an inner Arc. It would be much nicer if we could get rid of the inner Arc if possible because it would reduce complexity and indirection.

@rsimmonsjr
Copy link
Owner Author

Actually it is not possible because of Sized constraints in rust. The type dyn ActorMessage has no size and that messes up a lot of things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant