Question Stop Method Execution with timeout

MartinP

New member
Joined
Apr 22, 2009
Messages
3
Programming Experience
3-5
Hi,

my application has integrated an external library with long running math-evaluations. It happens that some calls to functions in this library start but do never come to an end.

Unfortunately I have no chance to look examine the behaviour of the library. So I got the idea to stop my function calls to the library after a timeout.

Has anybody an idea how to manage this an to control the execution of a function, i.e. to stop it hardly after a certain time?

Thx
Martin

P.S. If this article happend to be in the wrong thread - where does it belong to?
 
Hello.

You could try to call this function in the backgroundworker, and having a timer ticking in the mean time, if the timer ticks, just kill the backgroundworker-thread.

Bobby
 
Back
Top