-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
According to https://unicode-org.github.io/icu/userguide/icu/design.html#thread-safe-const-apis, using the methods that take a const this pointer is thread safe.
In my case I'd like to use UCollator across multiple threads, which should be safe since ucol_strcoll takes a const pointer, but I can't because it's not Sync+Send. I've looked at the source of rust_icu_ucol, and all the methods that take a non-const pointer in C are &mut self in Rust, except for set_attribute, which is generated by the generalized_fallible_setter macro. If generalized_fallible_setter is fixed to generate &mut self, would it be safe to mark UCollator (and other service objects, assuming the same is true for their methods) as Sync (edit: and Send)?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels