-
Notifications
You must be signed in to change notification settings - Fork 25
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
Shared NAL #43
Comments
My comments were only related to sharing the stack in multiple contexts (e.g. interrupt priorities), however that would also necessitate the usage of a mutex similar to For a single-threaded/single-context, this approach should be fine. |
How do folks feel about this wrapper existing in this crate vs another one? It can even be in this same repo but be published as a separate crate. A common pattern I've picked up on is separating trait crates from implementation crates, and this is an implementation. But it's so closely related, I wouldn't strongly object to it being published in parallel. |
I'm personally okay with having it implemented in this crate, which will give it some level of "officialness" as well. That's one issue I've always had with |
I share @ryan-summers point of view on this one. I feel like the goal is to put usefull blanket implementations like this into focus, rather than hiding them away for people to find themselves. |
I agree with @ryan-summers and @MathiasKoch. I think that would be the easiest for now. It would always be possible to spin it off in the future. |
Once #42 is merged, the NAL traits in this crate will no-longer be sharable on their own. It is necessary to create a new layer that can handle the sharing internally.
This can be split into two different types of sharing: single-thread (where RefCell can be used), and multi-threaded. Both can draw inspiration from Rahix/shared-bus.
I've drafted a simple RefCell-based wrapper here, inspired by the shared-bus Simple Manager. It's suitable for sharing access to the network stack in a single-threaded context. However @ryan-summers you mentioned that you think there may be issues with this approach? Would you mind clarifying?
More work will be necessary to create a sharing layer that's either Sync or Send.
The text was updated successfully, but these errors were encountered: