[webkit-dev] When should I use AtomicString vs String?

Simon Fraser simon.fraser at apple.com
Fri Jun 7 06:18:16 PDT 2013

Based on the fact that AtomicString is really a singleton string, I’d like to suggest a new name for this class:



On Jun 3, 2013, at 3:37 PM, Brendan Long <self at brendanlong.com> wrote:

> On 06/01/2013 10:09 PM, Glenn Adams wrote:
>> But the name did throw me, since I asked myself "what makes this more 'atomic' than String, synchronicity wise"? I'm sure I'm not the only one who wondered about this.
> Before asking this question I had assumed AtomicString was an atomic type (as in, safe to use in multi-threaded code). InternedString would have been more obvious, but the biggest problem was that searching for "WebKit AtomicString" didn't return any results that explained what it was. Now the top hit has an explanation, so it's not a big deal.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20130607/955fffd9/attachment.html>

More information about the webkit-dev mailing list