This is outdated. We have worked years ago to make calling const methods thread-safe across ICU.
I don't know why the collator argument is non-const. Maybe the
StringSearch code modifies its settings/attributes?
I see that there is a getCollator() function that returns the non-const Collator pointer, and the docs say that the caller can modify the collator.
So we couldn't just change the API by adding "const". If we wanted to offer APIs with non-const Collator arguments, then we would need to add new functions or overloads, and document that, if given a const Collator, the old getCollator() will return a nullptr.
In the meantime, it looks like the clean way to use this is to clone a prototypical Collator object for each thread.
You could look into the ICU code further and make sure that really nothing modifies the collator, other than a possible nefarious caller of getCollator().
And if so, let us know -- and you could const_cast a shared Collator...
Best regards,
markus