954,518 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Execute methods after start of thread

Hi,
I was wondering how in C# one would go about creating a worker thread, and after the Start Method is finished, have the thread preform another task.

For example:

I create a thread, and pass path[0].calculate.
Now once that is complete I would like to be able to on the same thread without creating a new one call path[1].calculate.

How would I go about doing this?
Thanks

HBMSGuy
Newbie Poster
22 posts since Apr 2009
Reputation Points: 10
Solved Threads: 1
 

You can use BackgroundWorker component which has something to do and has event "work compeleted"

Ramy Mahrous
Postaholic
2,196 posts since Aug 2006
Reputation Points: 480
Solved Threads: 276
 

Hey thank you so much. I didn't think to look under System.ComponetModel. That should help a lot.

HBMSGuy
Newbie Poster
22 posts since Apr 2009
Reputation Points: 10
Solved Threads: 1
 

If it works with you please mark this thread as solved.

Ramy Mahrous
Postaholic
2,196 posts since Aug 2006
Reputation Points: 480
Solved Threads: 276
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You