Control flow of program when event is raised
I created a simple component that raised an event in 1 of its method.
When this component was consumed by a client application and its method was called, the event was raised.
However some of the codes in the sub-program that called the method does not seem to get executed.
My question is, does the code in the event handler that handles the event, run concurrently with the codes of the method that raised the event?
Component1 has a method (method1) that raised an event (event1).
Client1 created an instance of component1 and invoked method1 in a subprogram (sub1), hence event1 is raised. Event1 is handled by an event handler (handler1).
Do the codes in component1.method1 wait for the code in client1.handler1 to finish execution before continuing or do the codes run concurrently (component1.method1 and client1.handler1)?
I hope you understand what I am trying to say.
Do appreciate if someone can help.
Thank you in advance.