ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/loops/NoopMutex.java
Revision: 1.1
Committed: Mon May 2 19:19:38 2005 UTC (19 years ago) by dl
Branch: MAIN
Log Message:
Put misc performance tests into CVS

File Contents

# User Rev Content
1 dl 1.1
2     import java.util.concurrent.atomic.*;
3    
4     class NoopSpin100M {
5     public static void main(String[] args) throws Exception {
6     AtomicInteger lock = new AtomicInteger();
7     for (int i = 100000000; i > 0; --i) {
8     lock.compareAndSet(0,1);
9     lock.set(0);
10     }
11     }
12     }