Answer the question
In order to leave comments, you need to log in
How to correctly call an event from a thread?
There is an object A (event sender) in which a thread is running, from which this event is periodically called. There is an object B that subscribes to the event and receives data from object A. When B handles the event, an exception is thrown as if the method of class B is running on the thread of object A, is this normal? Fixed via SynchronizationContext, but maybe there are better options?
Answer the question
In order to leave comments, you need to log in
When B handles the event, an exception is thrown as if B's class method is running on object A's thread, is that normal?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question