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

Introduce Rc owned management structs #100

Closed
8 tasks done
elfenpiff opened this issue Jan 28, 2024 · 0 comments
Closed
8 tasks done

Introduce Rc owned management structs #100

elfenpiff opened this issue Jan 28, 2024 · 0 comments
Assignees

Comments

@elfenpiff
Copy link
Contributor

elfenpiff commented Jan 28, 2024

Brief feature description

Currently, it is impossible to store a service with its corresponding ports and corresponding samples in a cache inside one struct due to the problems of Rust self referencing structs.

So something like:

struct MyThing {
  service: Box<dyn Service<MessageType>>,
  subscriber: Box<dyn Subscribe<MessageType>>,
  sample_cache: Vec<Box<dyn Payload<MessageType>>>,
}

cannot be realized. Every sample in the sample_cache holds a reference to the subscriber to release itself when going out of scope. Also, the subscriber holds a reference to service to remove it from the service when it goes out of scope.

The solution is, that the underlying construct, that performs the task, is stored in an Rc and has a shared ownership. When this is done, the lifetime restrictions should be lifted.

Introduce Rc and lift lifetime restrictions

  • Config
  • Sample
  • SampleMut
  • Publisher
  • Subscriber
  • Notifier
  • Listener
  • Remove needless traits Notify, Listen, Publish, Subscribe, Payload, PayloadMut & Update changelog
@elfenpiff elfenpiff added this to the iceoryx2 runtime milestone Jan 28, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Jan 28, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Jan 28, 2024
elfenpiff added a commit that referenced this issue Jan 29, 2024
@elfenpiff elfenpiff self-assigned this Jan 30, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Feb 3, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Feb 4, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Feb 4, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Feb 4, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Feb 4, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Feb 4, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Feb 8, 2024
elfenpiff added a commit that referenced this issue Feb 8, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Feb 11, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Feb 11, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Feb 11, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Feb 11, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Feb 11, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Feb 11, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Feb 11, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Feb 19, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Feb 19, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Feb 19, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Feb 19, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Feb 19, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Feb 19, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Feb 20, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Feb 20, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Feb 20, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Feb 20, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Feb 20, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Feb 20, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Feb 20, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Feb 20, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Feb 20, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Feb 20, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Feb 20, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Feb 20, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Feb 20, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Feb 20, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Feb 20, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Feb 20, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Feb 20, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Feb 20, 2024
elfenpiff added a commit that referenced this issue Feb 20, 2024
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