How can I handle two receive handlers correctly?

Markus Freitag 3,786 Reputation points
2020-07-30T13:20:12.913+00:00

Hello,
I have a control application that receives information from two handlers

WPF - Desktop App ----- Handler1
------- Handler2

If I'm in handler 1, handler 2 will have to wait and reverse.

Is a locker object enough?
object locker1 = new object();
object locker2 = new object();

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,691 questions
{count} votes