I have a question about whether WebCore code makes assumptions about the atomicity of certain read/write operations.
The particular instance I'm interested in is IconDatabase, where m_threadTerminationRequested is written to from the main thread (in close() for example) and read from the DB thread (in syncThreadMainLoop()) without any locking. It looks like the code is written such that there's no particular synchronization requirement in terms of the order in which the value is set and read. But there's a risk of a garbled read in the case of a simultaneous read and write from the two threads. I assume that the lack of locking is an intentional decision, based on the fact that on all relevant architectures, a boolean read/write is atomic? Is this a general WebCore policy? It would be great if somebody could confirm this, or point out why I'm wrong. Thanks, Steve -- Google UK Limited Registered Office: Belgrave House, 76 Buckingham Palace Road, London SW1W 9TQ Registered in England Number: 3977902 _______________________________________________ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev