This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

SimpleDateFormat thread problems?


This is a bit vague, but maybe someone on this list will have some insights...

I have some simple Java code that runs in two threads. One thread runs a command line interface. Another thread runs a job scheduler. The job scheduler has a method that returns some stats as a string (e.g. scheduler start time, number of jobs processed so far, etc...). From the command line thread, I can ask for these stats. It seems that after asking for stats a few times, the job scheduler thread hangs, i.e. every time I ask for the stats, I get the same result. If I remove the SimpleDateFormat code that prints the date information in a human-readable way, this problem seems to go away. The stats command also runs noticeably faster.

Thanks for any help...





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]