Details
-
Task
-
Resolution: Unresolved
-
P2: Important
-
Some future release
-
None
Description
Currently DOM has multiple sync points based on mutexes and lot's of shared_ptr's (managed values of which are not thread-safe) stored in maps of DomEnvironment and DomUniverse.
Taking into account that DOM is indeed being used in the multi-threaded environments. It would be helpful to:
- Figure out the usecases and thread management
- Improve explicitness of the sync points
- Improve thread-safety. There might be potential data-races / deadlocks, we're not aware of
- Reconsider thread sync approach. maybe we can do everything in lock-free manner
- Remove DomEnv::Options::SingleThreaded, 'cos it doesn't say anything and DOM is used in multithreaded env?
- Also there might happen a sync problem between with the current file and created dom as you edit the file. Sometimes, we get invalid dom on editing the document even if the document is syntactically correct.