Add a Java like Thread class