MCPcopy Create free account
hub / github.com/EdwardRaff/JSAT / addAndGet

Method addAndGet

JSAT/src/jsat/utils/concurrent/AtomicDouble.java:49–58  ·  view source on GitHub ↗

Atomically adds the given value to the current value. @param delta the value to add @return the updated value

(double delta)

Source from the content-addressed store, hash-verified

47 * @return the updated value
48 */
49 public final double addAndGet(double delta)
50 {
51 while(true)
52 {
53 double orig = get();
54 double newVal = orig + delta;
55 if (compareAndSet(orig, newVal))
56 return newVal;
57 }
58 }
59
60 public boolean compareAndSet(double expect, double update)
61 {

Callers 13

countUpMethod · 0.45
callMethod · 0.45
runMethod · 0.45
mainLoopWorkMethod · 0.45
InitializeMethod · 0.45
runMethod · 0.45
runMethod · 0.45
initialClusterSetUpMethod · 0.45
runMethod · 0.45
step3bUpdateMethod · 0.45
runMethod · 0.45
runMethod · 0.45

Calls 2

getMethod · 0.95
compareAndSetMethod · 0.95

Tested by

no test coverage detected