Confirmed users
398
edits
| Line 6: | Line 6: | ||
To make the implementation more easier, versioned pointers assume there is one thread at most to modify the DOM three and create a new version at any moment, other threads can read the older versions at the same time. So, the web content/main thread is the modifier in our case, and layout and renderer threads are readers. | To make the implementation more easier, versioned pointers assume there is one thread at most to modify the DOM three and create a new version at any moment, other threads can read the older versions at the same time. So, the web content/main thread is the modifier in our case, and layout and renderer threads are readers. | ||
The versioned pointers are implemented as a C++ template to override operators of assignment, casting, ... etc. | The versioned pointers are implemented as a C++ template to override operators of assignment, casting, ... etc. With the help of the template classes of versioned pointers, the modifiers were changed minor. | ||
The scope of the code of readers is far smaller than the modifier. So, it is more easy to change the way of accessing pointers at readers side. The readers are only the layout engine and the renderer. | The scope of the code of readers is far smaller than the modifier. So, it is more easy to change the way of accessing pointers at readers side. The readers are only the layout engine and the renderer. | ||