/[projects]/miscJava/Test3/src/dk/thoerup/asyncsamples/DummyWork.java
ViewVC logotype

Contents of /miscJava/Test3/src/dk/thoerup/asyncsamples/DummyWork.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 645 - (show annotations) (download)
Mon Apr 12 12:53:28 2010 UTC (14 years, 1 month ago) by torben
File size: 400 byte(s)
Added some samples for async code execution 
1 package dk.thoerup.asyncsamples;
2
3 import java.util.logging.Logger;
4
5 public class DummyWork {
6 static final int MAX = 10;
7 static final Logger logger = Logger.getLogger(DummyWork.class.getName());
8
9 static final void doWork() {
10 for (int i=1; i<=MAX; i++) {
11 logger.info("Iteration " + i + " of " + MAX);
12
13 try{ Thread.sleep(500); } catch (InterruptedException e) {};
14 }
15 }
16 }

  ViewVC Help
Powered by ViewVC 1.1.20