From: Edward D. <emp...@ya...> - 2007-10-15 04:28:12
|
--- John David Galt <jd...@di...> wrote: > >> ... only one out of four attempts succeed... > >> > >> I believe this bug first appeared in the 20070604 > build. > > Clemens Katzer writes: > > It's good possible that it needs more memory on > startup than before, > > due to the various improvements /added features. > > I'd be surprised if that's an issue. I have 256 > meg, and I can easily run > Firefox and other apps at the same time as Colossus > without any of them > slowing down noticeably. > > > And if you have old OS or few memory, and computer > might have to start > > swapping for that, then the "carefully balanced > timing" > > (which, by luck, goes always fine if there is > nothing special), > > of "which thread starts when" gets messed up . > Just a guess... > > I guess I don't know enough about what determines > which thread starts when, > but if that's a matter of luck at all, it seems to > me it's bad design (not > necessarily by anyone here -- maybe it's a JWS or > even a Windows problem). > One "main" thread ought to be explicitly spawning > each of the others at the > proper time -- and if one thread needs another to be > present to run, the > needed thread should be starting first, or should be > explicitly waited for. > I've written pthreads code in C, I don't know its > equivalent in Java. > <snip> The relevent code would be using "Synchronized" and stuff out of JavaX.SwingUtilities especially the invokeLater() method. The latter causes the invokation of the passed method to first clear the Event Thread. Ideally, the Event thread should be the only thread to actually interact with the GUI/swing objects. I recently added a bug report about a thread race condition in the main thread. (I think the Main thread should first spawn a helper/server thread to do all it's non-startup work and exit. but that's another story.) ____________________________________________________________________________________ Need a vacation? Get great deals to amazing places on Yahoo! Travel. http://travel.yahoo.com/ |