They aren't. There is no 1:1 thread construct in JavaScript for sharing memory between threads. Web workers seem like a solution, but it's incorrect to think that is what's going on here. You could use message passing with web workers, but emscripten currently won't turn a semaphore into web worker code. The Unreal Engine 3 had to support older hardware, single core boxes, which is what the demo is compiled as.