terminal/src/cascadia/PublicTerminalCore
Leonard Hecker f68324cd09
Fix output stuttering using a ticket lock (#10653)
`SRWLOCK`, as used by `std::shared_mutex`, is a inherently unfair mutex
and makes no guarantee whatsoever whether a thread may acquire the lock
in a timely manner. This is problematic for our renderer which relies on
being able to acquire the lock in a timely and predictable manner.
Drawing stalls of up to one minute have been observed in tests.

This issue can be solved with a primitive ticket lock, which is 10x
slower than a `SRWLOCK` but still sufficiently fast for our use case
(10M locks per second per thread). It's likely that any non-trivial lock
duration will diminish the difference to "negligible".

## Validation Steps Performed

* It still blends ✔️
2021-07-14 23:41:22 +00:00
..
HwndTerminal.cpp Fix output stuttering using a ticket lock (#10653) 2021-07-14 23:41:22 +00:00
HwndTerminal.hpp Fix output stuttering using a ticket lock (#10653) 2021-07-14 23:41:22 +00:00
pch.cpp add wpf control (#2004) 2019-10-11 14:02:09 -07:00
pch.h Exclude more rarely-used stuff from Windows headers (#8513) 2020-12-11 19:35:23 +00:00
PublicTerminalCore.vcxproj Introduce a api-ms-win-core-synch-l1-2-0 shim for Windows 7 (#10559) 2021-07-07 16:48:28 +00:00
PublicTerminalCore.vcxproj.filters add wpf control (#2004) 2019-10-11 14:02:09 -07:00