How to clone Msg in C# in the onUpdateMsg handler?

In C# as there is no EmaFactory how do we clone Msg?

We are using the pub / sub pattern to offload to other threads for processing.

We are currently trying this :

var clonedMsg = new RefreshMsg(msg);

but we still seem to get a dead lock when accessing fields on the clonedMsg on a different thread.

Best Answer

  • Gurpreet
    Answer ✓

    Hello @andrewjamesfry,

    The Update message has a Clone() method which you can use to get your own copy of original update message.


    1715003200833.png