Currently, Style is Send and Sync primarily due to it needs to be held in the StyleRegistry which is internally Arc<Mutex<X>>.
However, it prevents Style and the upcoming StyleManager from holding any elements from web-sys which is a trade off that I consider to be big enough.
This issue aims to investigate whether is worth to make StyleRegistry thread local with Rc<RefCell<X>> and Style !Send and !Sync so elements can be held in them.
Currently, Style is Send and Sync primarily due to it needs to be held in the StyleRegistry which is internally
Arc<Mutex<X>>
.However, it prevents Style and the upcoming StyleManager from holding any elements from web-sys which is a trade off that I consider to be big enough.
This issue aims to investigate whether is worth to make StyleRegistry thread local with
Rc<RefCell<X>>
and Style!Send
and!Sync
so elements can be held in them.