Recommended way to handle race conditions in NT8?

I’ve run into OnBarUpdate or OnMarketData reading/writing along with OnRender and I wonder if there are recommended NT ways to handle it?

For my particular issue where OnBarUpdate was writing on bar close I implemented a lock there and made OnRender return when lock exists:

if (!System.Threading.Monitor.TryEnter(pivotLock)) { return; }

The reason I’m asking is because AI is either recommending double or triple buffering, or locks sprinkled everywhere, but I think ‘my way’ ™ above is better for performance which made me wonder if there are other ways?