So opt-out features such as no-thread-local are not the correct approach. If one crate depending on qcell opts out, but another one doesn't, it will be forced to opt out anyway as things are at the moment (because cargo builds just one instance of the crate with the sum of all features enabled). This will mean things not working correctly, i.e. probably it will panic immediately on running.
So probably it is best to split out global and thread-local-based TCell as two different types instead of using features.
So opt-out features such as
no-thread-local
are not the correct approach. If one crate depending onqcell
opts out, but another one doesn't, it will be forced to opt out anyway as things are at the moment (because cargo builds just one instance of the crate with the sum of all features enabled). This will mean things not working correctly, i.e. probably it will panic immediately on running.So probably it is best to split out global and thread-local-based
TCell
as two different types instead of using features.