10000 Fix #1842: Port AbstractPromise and add as override for 2.11.8. · scala-js/scala-js@e054734 · GitHub
[go: up one dir, main page]

Skip to content

Commit e054734

Browse files
committed
Fix #1842: Port AbstractPromise and add as override for 2.11.8.
1 parent 98e0591 commit e054734

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package scala.concurrent.impl
2+
3+
import java.util.concurrent.atomic.AtomicReference
4+
5+
@Deprecated // Since 2.11.8. Extend java.util.concurrent.atomic.AtomicReference instead.
6+
abstract class AbstractPromise extends AtomicReference[AnyRef] {
7+
protected final def updateState(oldState: AnyRef, newState: AnyRef): Boolean =
8+
compareAndSet(oldState, newState)
9+
10+
protected final def getState(): AnyRef = get()
11+
}

0 commit comments

Comments
 (0)
0