Parent Directory | Revision Log
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 |