Discussion Board
Go to the previous messageGo to the following message
Current Forum: Homework 6- Tournament
Date: Tue Dec 11 2001 3:00 am
Author: Cipriani, Jason A. <jac4@andrew.cmu.edu>
Subject: Re: Threads (killing them)

i've never done any multithreading stuff in java before. for a while, i was getting some IllegalThreadStateExceptions and stuff was acting weird. so i set my timer thread up as a daemon thread.

what i've been wondering is, though, since our players will be running in their own processes, and the process will terminate itself or be killed automatically after a time limit, is there any dangers i should be aware of in terms of causing thread-related exceptions?

i'm not really sure how to cleanly kill a thread without just letting it die. normally i'd just do something that appeared to work, but i don't want to risk the program crashing in the tournament. so, my timer thread just executes for 5 seconds no matter what, even if the ai gets a move out before then (which sometimes happens in certain cases). when our player's process gets killed, will there be any potential problems having to do with threads that are still running?

thanks,

jason
Post response

Go to the previous messageGo to the following message
Current Thread Detail:
Threads      Bortz, Andrew S.      Sat Dec 8 2001 5:06 pm       
Re: Threads      Maxim, Michael G.      Sat Dec 8 2001 7:05 pm       
Re: Threads      Cipriani, Jason A.      Mon Dec 10 2001 10:53 am       
Re: Threads (more about 5 sec...      Cipriani, Jason A.      Mon Dec 10 2001 11:14 am       
Re: Threads      Maxim, Michael G.      Mon Dec 10 2001 5:19 pm       
Re: Threads      Cipriani, Jason A.      Mon Dec 10 2001 6:41 pm       
Re: Threads      Anonymous      Mon Dec 10 2001 7:17 pm       
Re: Threads      Fields, David C.      Mon Dec 10 2001 8:08 pm       
Re: Threads      Cipriani, Jason A.      Mon Dec 10 2001 9:27 pm       
Re: Threads      Maxim, Michael G.      Mon Dec 10 2001 10:45 pm       
Re: Threads...      Cipriani, Jason A.      Tue Dec 11 2001 3:00 am       
Re: Thread...      Maxim, Michael G.      Tue Dec 11 2001 4:34 am       
Re: Thread...      Cipriani, Jason A.      Tue Dec 11 2001 5:07 am       
Re: Threads      Anonymous      Mon Dec 10 2001 8:51 pm       
Re: Threads      Anonymous      Mon Dec 10 2001 10:23 pm       

Back to previous screen