calling RequestAdditionalTime multiple time.

A

archana

Hi all,

I am developing windows service in framework 2.0

On Onstop , i want to wait till thread completed current process. But
i don't know how long will it take.
So what i did is added one flag and ononstop i am checking that flag
in while loop like following;

while (c.iscompleted == false)
{
this.RequestAdditionalTime(2000);
Thread.Sleep(2000);
i++;
}

Is is correct way. Means can i call requestadditionaltime more than
once. Becuase event if i call anove code on onstop if my thread take
more time service is not stopping properly.

Please help me asap.

thanks in advance.
Archana
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top