flâneur — a map of the web's best reading

Locking in WebKit | WebKit

webkit.org · 10,945 words · saved by 1 readers

We recently replaced all spinlocks, OS-provided mutexes, and condition variables in WebKit with the new WTF::Lock and WTF::Condition — these new primitives have some cool properties.

Locking in WebKit May 6, 2016 by Filip Pizlo @filpizlo Back in August 2015 we replaced all spinlocks and OS-provided mutexes in WebKit with the new WTF::Lock (WTF stands for Web Template Framework). We also replaced all OS-provided condition variables with WTF::Condition . These new primitives have some cool properties: WTF::Lock and WTF::Condition only require one byte of storage each. WTF::Lock only needs two bits in that byte. The small size encourages using huge numbers of very fine-grained locks. OS mutexes often require 64 bytes or more. The small size of WTF::Lock means that there&#8217

Explore this link on the map →

saved by

related reading