jcurzez.test
Class ThreadSafety

java.lang.Object
  |
  +--jcurzez.test.ThreadSafety

public class ThreadSafety
extends java.lang.Object

A little test program to test Jcurzez thread safety.

Version:
0.0.4
Author:
Thomas Girard

Nested Class Summary
private static class ThreadSafety.ClockThread
          Writes time at position x, y
 
Field Summary
private static java.text.SimpleDateFormat df
          To display the date like I want.
private static int height
          Height of the screen.
private static Screen screen
          The screen.
private static java.lang.ThreadGroup threads
          The thread group that owns all the threads this test will create.
private static int width
          Width of the screen.
 
Constructor Summary
ThreadSafety()
           
 
Method Summary
static void main(java.lang.String[] args)
          Test thread safety by having multiple threads write on the screen.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

threads

private static final java.lang.ThreadGroup threads
The thread group that owns all the threads this test will create.


df

private static final java.text.SimpleDateFormat df
To display the date like I want.


screen

private static final Screen screen
The screen.


width

private static final int width
Width of the screen.


height

private static final int height
Height of the screen.

Constructor Detail

ThreadSafety

public ThreadSafety()
Method Detail

main

public static void main(java.lang.String[] args)
                 throws java.lang.InterruptedException
Test thread safety by having multiple threads write on the screen.

Throws:
java.lang.InterruptedException - raised if the sleep is interrupted.


Send me an email