-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Currently the COM calls are skipping borrow checkers and there are no real safeties against calling multiple &mut self methods in parallel.
We should try to achieve the following:
- If all of the implemented interfaces/etc. are defined as
&selfmethods, the underlying type will beImmutableComClasswhich has the type without aRefCell. This allows more performant calls (no borrow checking). The user can use such types for immutable data or for performance critical mutable data at which point they are responsible for handling the mutable data with their own RefCells. - If any of the implemented interfaces/etc. use
&mut self, the underlying type will beMutableComClasswhich has the type within aRefCell. This enables runtime borrow checking.
This might need us to expand the #[com_class] attribute with something like #[com_class_mut] or #[com_class(IReadOnlyInterface, mut IWriteInterface)]
Metadata
Metadata
Assignees
Labels
No labels