Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
'reset' a thread in Java?
Name: neal Date: December 23, 2008 at 07:07:57 Pacific OS: vista business SP1 3 CPU/Ram: athlon64x2 6000+/4GB Product: - / -
Comment:
Hi, I'm writing a game in which the character has an ability that has to 're-charge', and I was wondering if it is possible to reset a thread. I have written a method inside a thread that handles what the ability does when it is run, including the re-charge delay. What I want to do is to be able to leave the thread object instantiated, and just call the run method again when the delay is up (currently recorded by a boolean). Currently, that gives an error; the thread has finished its execution and doesnt want to run again, but is there a way that i could be run again? Thank you
Summary: hi, can anyone tell me what code i would need to use so that i can reset a variable in java by clicking on a link?everytime i try it just continues to use the original variable... ive tryied a couple ...
Summary: Can a thread in java be allowed to sleep for microseconds ...say 605.4micro seconds??? sleep(long millis) or sleep(long millis,int nanos) is generally accepted... so how do i allow it sleep for a frac...
Summary: Hello all, I am doing this project in Java where I am to have three balls bouncing around in an Applet hitting off each other and off the walls. I decided to use Threads for the animation. I have th...