Open hsivonen opened 1 year ago
@hsivonen I'm assigning this to you but I'm willing to be the reviewer.
It's unclear to me, though, if
DataPayload
is OK to allocate on one thread and free on another thread unless it's been compiled with thesync
option.
DataPayload has a non-atomic Rc
inside by default, which becomes Arc
if compiled with the sync
feature.
hb_unicode_funcs_t
marked immutable has HarfBuzz-provided atomic refcounting for multithreaded use. Also, the ICU4X data structures themselves that are held withinDataPayload
should be fine to read from multiple threads (even if not marked so on the Rust level). It's unclear to me, though, ifDataPayload
is OK to allocate on one thread and free on another thread unless it's been compiled with thesync
option.We should document the multithreading constraints (or the absence of constraints) that apply to
hb_unicode_funcs_t
set up byicu_harfbuzz
.