I need to know if it is possible to call a subroutine with a timeout so that after the timeout period, the subroutine will automatically terminate like a process kill.
Currently, the subroutine has not thrown an exception yet so I can't do anything with it.
But if it runs for more than a few seconds, then this means that it has hanged and I want to terminate the running of this subroutine automatically after the timeout period.
In case anyone is wondering, the subroutine is from a component and I don't know how the code in it works.
Any help in the right direction would be helpful.
Yes, it is possible.
The answer is here:
http://social.microsoft.com/Forums/en-US/netfxbcl/thread/04beb790-51f6-4be3-b927-38956196b525
Originally posted by kilfer:Yes, it is possible.
The answer is here:http://social.microsoft.com/Forums/en-US/netfxbcl/thread/04beb790-51f6-4be3-b927-38956196b525
Looks interesting. But I have changed my code and no longer using that component. Still it's good to know this for the future. Thanks.