Comparison of Java Threads and SugarCubes

The comparison is described in a paper which is to be read first (more complete version of it: Java threads and SugarCubes, Frédéric Boussinot, Jean-Ferdy Susini, Software Practice & Experience, vol 30(5), 545-566, 2000).

The code is available in tar.gz format. Here is a description of the directory which contains it:

AdHocSolutionWithThreads contains a very simple but ad hoc thread based solution. To run it, compile with:


then run the applet with, for example:

appletviewer SinCos.html

NOTE: CLASSPATH must contain the current directory and the directory Code. For example, on Unix:

export CLASSPATH=.:/0/p1/rc/fb/ComparisonThreadsSugarCubes/Code

The simple path also works:

export CLASSPATH=.:.. uses double-buffering, to see the icon trajectory more defines two icons, each one executed  asynchronously by distinct threads.

SugarCubesSolution contains the SugarCubes solution. The applet to run is in SinCosReact.html.

GeneralSolutionWithThreads contains the generic thread-based solution using a synchronizer object in The basic code is in and the corresponding applet is in SyncThreads.html.

For Unix, two utilitaries: cleanAll to remove all .class files and makeAll to compile all the classes.

inria is the directory that contains the SugarCubes (version 1).

In case of problems, please feel free to contact: