On Tue Nov 25 15:41:21 2025 +0000, Paul Gofman wrote:
Isn't it a tiny bit nicer this way? The check is redundant. In the very rare potential case when it will read some stale data it will do `get_window_relative() call but will remain functionally correct with InterlockedExchange( &first_window, 0 ). But the vast majority of cases will go without fenced memory read.
I don't think a fence here would have any cost? I would even argue that you could remove the check entirely and call `get_window_relative` unconditionally. A server call here is likely not an issue and we could probably ultimately get rid of it through window shared memory once that's implemented.