RE: RE: [Rcosjava-general] Threading in the applet
Status: Beta
Brought to you by:
newmana
From: <And...@ne...> - 2001-10-11 13:01:57
|
"Peggy Newman" <pe...@ip...> wrote: >> It goes init(), start(), run(), and stop(). init() does the basic >> initialisation. start() calls startThread() (from >> setupAnimatorLayouts()). > >umm, isn't startThread() called from init()? Not that I think it makes >a lot of difference, by the looks of it both init() and start() are >called again when the page/applet is "refreshed". > You're right. The current CVS version has got startThread() at the end of init(). In my haste I didn't check this. As I'm trying to get stepping of instructions working again I've moved this around a bit in my local copy. As you said it doesn't really matter because viewing, reloading, back/forward the applet page calls init(), start(), stop() and destroy(). Some progress has been made over the last 5 years. :-) >> If startThread() is not called by start() >> then the running variable is always false. So when it gets to run() >> the thread waits and is never notified. > >In what cases would this happen? > Never. Sorry this caused confusion. The only reason this would happen is if it was commented out in the source code. I was just trying to clarify my answer your question about the usefulness of startThread() being called. >Possibly stupid question: >Are the methods isRunning() and startThread() in the applet >accessible (or indeed accessed) from other classes? > They are accessible but they aren't used at the moment. In previous versions (depending how far back you go) this was used by ProgramManager. In some future version this might be accessed by ProgramManager or possibly the Kernel. __________________________________________________________________ Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/ Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/ |