Delay initiating layout operations for as long as possible.

I guess that's right. But what's unfortunate is that if layout is already doing reflow (say, due to a window resize), and flush_layout triggers another reflow, layout will report "reflow done" after the first layout, and join_layout will be unblocked.

So I guess the way you have it removes stale content conditions, but they're still possible. I don't have a good solution to this, so I guess this looks fine to me.