Revision: | 1.2 |
Committed: | Mon May 9 19:33:30 2005 UTC (19 years ago) by dl |
Branch: | MAIN |
Changes since 1.1: | +5 -0 lines |
Log Message: | Add headers |
# | Content |
---|---|
1 | /* |
2 | * Written by Doug Lea with assistance from members of JCP JSR-166 |
3 | * Expert Group and released to the public domain, as explained at |
4 | * http://creativecommons.org/licenses/publicdomain |
5 | */ |
6 | |
7 | import java.util.concurrent.atomic.*; |
8 | |
9 | class NoopSpin100M { |
10 | public static void main(String[] args) throws Exception { |
11 | AtomicInteger lock = new AtomicInteger(); |
12 | for (int i = 100000000; i > 0; --i) { |
13 | lock.compareAndSet(0,1); |
14 | lock.set(0); |
15 | } |
16 | } |
17 | } |