This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * jsTree 1.0-rc3 | |
| * http://jstree.com/ | |
| * | |
| * Copyright (c) 2010 Ivan Bozhanov (vakata.com) | |
| * | |
| * Licensed same as jquery - under the terms of either the MIT License or the GPL Version 2 License | |
| * http://www.opensource.org/licenses/mit-license.php | |
| * http://www.gnu.org/licenses/gpl.html | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class test1 implements Runnable { | |
| long start; | |
| long stop; | |
| static long sum = 0; | |
| static Object lock = new Object(); | |
| public test1(long start, long stop) { | |
| this.start = start; | |
| this.stop = stop; | |
| this.sum = sum; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class AtomicLong { | |
| long value; | |
| public AtomicLong(long l) { | |
| value = l; | |
| } | |
| synchronized long addAndGet(long add) { | |
| value += add; | |
| return value; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class test1 implements Runnable { | |
| long start; | |
| long stop; | |
| static long sum = 0; | |
| static Object lock; | |
| public test1(long start, long stop, AtomicLong sum) { | |
| this.start = start; | |
| this.stop = stop; | |
| this.sum = sum; |