@@ -69,15 +69,15 @@ private[concurrent] object Promise {
69
69
/**
70
70
* Compresses this chain and returns the currently known root of this chain of Links.
71
71
**/
72
- final def promise (owner : DefaultPromise [T ]^ ): DefaultPromise [T ]^ {cap.rd, this , to, owner} = {
72
+ final def promise (owner : DefaultPromise [T ]^ ): DefaultPromise [T ]^ {to, owner} = {
73
73
val c = get()
74
74
compressed(current = c, target = c, owner = owner)
75
75
}
76
76
77
77
/**
78
78
* The combination of traversing and possibly unlinking of a given `target` DefaultPromise.
79
79
**/
80
- @ inline @ tailrec private [this ] final def compressed (current : DefaultPromise [T ]^ {cap.rd, this }, target : DefaultPromise [T ]^ , owner : DefaultPromise [T ]^ ): DefaultPromise [T ]^ {this , current , target, owner} = {
80
+ @ inline @ tailrec private [this ] final def compressed (current : DefaultPromise [T ]^ {this , to }, target : DefaultPromise [T ]^ {cap, this , current}, owner : DefaultPromise [T ]^ ): DefaultPromise [T ]^ {to , target, owner} = {
81
81
val value = target.get()
82
82
if (value.isInstanceOf [Callbacks [_]]) {
83
83
if (compareAndSet(current, target)) target // Link
@@ -151,7 +151,7 @@ private[concurrent] object Promise {
151
151
val buffer = new AtomicReference [Success [Any ]]()
152
152
val zipped = new DefaultPromise [R ]()
153
153
154
- val thisF : Try [T ] => Unit = {
154
+ val thisF : Try [T ] -> {f} Unit = {
155
155
case left : Success [_] =>
156
156
val right = buffer.getAndSet(left).asInstanceOf [Success [U ]]
157
157
if (right ne null )
@@ -160,7 +160,7 @@ private[concurrent] object Promise {
160
160
zipped.tryComplete(f.asInstanceOf [Failure [R ]])
161
161
}
162
162
163
- val thatF : Try [U ] => Unit = {
163
+ val thatF : Try [U ] -> {f} Unit = {
164
164
case right : Success [_] =>
165
165
val left = buffer.getAndSet(right).asInstanceOf [Success [T ]]
166
166
if (left ne null )
@@ -349,7 +349,7 @@ private[concurrent] object Promise {
349
349
350
350
/** Link this promise to the root of another promise.
351
351
*/
352
- @ tailrec private [concurrent] final def linkRootOf (target : DefaultPromise [T ]^ , link : Link [T ]^ ): Unit =
352
+ @ tailrec private [concurrent] final def linkRootOf (target : DefaultPromise [T ]^ , link : Link [T ]^ {cap, target} ): Unit =
353
353
if (this ne target) {
354
354
val state = get()
355
355
if (state.isInstanceOf [Try [_]]) {
0 commit comments