[webkit-dev] Strings on multiple threads
ap at webkit.org
Fri Dec 4 12:23:13 PST 2009
On 03.12.2009, at 18:13, Jeremy Orlow wrote:
> Easier said than done in many cases. For DOM Storage and Databases,
> there are several classes that are used on multiple threads. And
> several of these classes contain strings (or contain things that
> contain strings). It seems very difficult to be absolutely sure
> these strings are only shared in a safe way unless you make a
> threadsafeCopy every time you access it. Doing so would probably be
> negligible performance wise for all the cases I'm looking at, so
> maybe that's the right answer, but these issues are very subtle.
> And that's what concerns me most.
We should aim to gradually redesign these classes to only use message
passing, and generally cleaning up what happens on which thread.
It's indeed very difficult to work with strings in this code, but I
don't think that's the only problem that arises from using objects on
multiple threads there, and it's not necessarily one to tackle in
- WBR, Alexey Proskuryakov
More information about the webkit-dev