changed post task extension from user set to api set and added flag in each thread which must be set when the post switch extension is to be run.