how to timeout a command - Java
This is a discussion on how to timeout a command - Java ; You better read about Threads.
Here is short example. It's not good enough for real application (because it
waits 2 seconds anyway)
but it's good for start.
public class Controller {
public static void main(String[] args) {
Executer ex=new Executer();
...
-
-
how to timeout a command
Hi all,
I need to execute a command, a method of an object, which will run for an
uncertain amount of time. It could be a long time. So what I want to do is
if the command does not return , say , in two or three seconds, I would like
to terminate it and move on. Is there any way I can do something like that?
Thank you for your help.
Wai
Similar Threads
-
By Application Development in forum ADO DAO RDO RDS
Replies: 8
Last Post: 09-25-2008, 01:23 PM
-
By Application Development in forum ADO DAO RDO RDS
Replies: 4
Last Post: 12-05-2007, 02:45 PM
-
By Application Development in forum ADO DAO RDO RDS
Replies: 0
Last Post: 09-23-2007, 08:43 PM
-
By Application Development in forum TCL
Replies: 0
Last Post: 05-23-2007, 06:55 AM
-
By Application Development in forum DOTNET
Replies: 1
Last Post: 01-03-2004, 04:17 PM