[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Scheduling of two Java Applets



Hi

   At http://home.no.net/oyvteig/tm/b/Tm_smalls.html you will find two
   instances of my TuringMachine. In 5% of the startup cases, it will
   "unscramble" the sign-on message "animated" inside the "paint" method.
   If I start them with Exporer 5.0 for Windows, and I press "Refresh"
   until the top Turing Machine does the live unscrambling, THE SECOND
   MACHINE DOESN'T COME UP until after the first one has finished with the
   unscrambling. (You may have to press "Refresh" a large number of
   times..)

   This is strange, the first one does a Thread.sleep in the code, so the
   second machine should be able to start. It doesn't. What kind of
   multithreading is this?

   It seems like the Applet Java scheduler does not do a new Applet start
   before the first's paint method has been finished(?) Is this correct
   explanation, or is there more to it?

   (The code password is "mathison", if anybody wants to have a look. Go
   one level up.)

Øyvind
--
@ Oyvind Teig
@ Kongsberg Maritime Ship Systems, Ship Control, 7005 Trondheim Norway
@ http://home.no.net/oyvteig/