I want to start a seperate thread and block the calling thread until that thread has completed.
I am doing this because I need to call a method that is uploading a lot of data and needs to be aborted under some situations. I want the thread that makes this methodo call to block in the normal case when no abortion is neccessary. I don't want to have to abort the calling thread in order to end the upload method because the calling thread needs to perform cleanup.
What is the best way to do this?