Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

BackgroundWorker completed event - which thread?

Does the completed event of the BackgroundWorker control come back on the GUI thread or do i have to marshal that back.

Also, does the progress event come back on the GUI thread or do i have to marshal that back?

like image 597
leora Avatar asked Dec 18 '22 08:12

leora


2 Answers

Both events will be marshalled onto the UI thread.

like image 100
Mitch Wheat Avatar answered Dec 19 '22 23:12

Mitch Wheat


All events are going to come back on the thread that created the instance of the BackgroundWorker. All your client has to do is listen for the event.

You've probably been here, but see also: BackgroundWorker Events

like image 33
Jim H. Avatar answered Dec 19 '22 22:12

Jim H.