ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/loops/NoopSpin100M.java
Revision: 1.2
Committed: Mon Aug 10 06:47:11 2015 UTC (8 years, 8 months ago) by jsr166
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
Log Message:
avoid wildcard imports

File Contents

# User Rev Content
1 jsr166 1.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/publicdomain/zero/1.0/
5     */
6    
7 jsr166 1.2 import java.util.concurrent.atomic.AtomicInteger;
8 jsr166 1.1
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     }