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
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