일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- program
- Python
- Malaysia
- history
- erlang
- comic agile
- web
- Kuala Lumpur
- management
- Book
- essay
- Java
- hadoop
- Spain
- programming_book
- MySQL
- hbase
- Italy
- RFID
- France
- QT
- psychology
- ubuntu
- leadership
- django
- Software Engineering
- Book review
- Linux
- agile
- Programming
- Today
- Total
목록volatile (2)
import java.util.Random; import java.util.concurrent.CountDownLatch; class TestVolatile2 { public static void main(String[] args) { try { final int N = 128; final int M = 8 * 1024 * 1024; final int TN = 4; { finalCountDownLatchcdl=new CountDownLatch(TN); finalBadAtomicLongal=new BadAtomicLong(); Threadt1=new Thread(new Runnable() { @Override public void run() { try { for ( int i = 0; i < 2 * TN ..
class TestVolatile { public static void main(String[] args) { finalintINTERVAL_TIME=15; finalBadAtomicLongbal=new BadAtomicLong(); finalGoodAtomicLonggal=new GoodAtomicLong(); finalGoodAtomicLong2gal2=new GoodAtomicLong2(); Threadt1=new Thread(new Runnable() { @Override public void run() { try { while ( true ) { Thread.sleep(INTERVAL_TIME); bal.getAndSet(1L); gal.getAndSet(1L); gal2.getAndSet(1L..