vb.net - Events executes in current thread or in a new one -


When an event is picked up, the handler implements the same thread in the main program or another thread.

Thank you!

It is executed on the thread that generated the event.

Example:

  • User hits a button: GUI thread.
  • Updates an asset on a background thread object: that background thread
  • receives a WCF message: a thread from the thread pool

If you are working in GUI, then it means that you need to merge the incident from the background thread to the GUI thread, touch any control.


Comments