Skip to content

Yield Return Inside Lock

Michael Damatov edited this page Sep 10, 2025 · 4 revisions

Shows a warning when yield return statements are found inside lock blocks.

Note

The analyzer doesn't warn if the lock is taken on a Lock object.

Note

The analyzer can be configured or deactivated in the ReSharper Options or Rider Settings dialog.

Clone this wiki locally