Using local methods other than static methods to execute threads