Response waiter is now volatile, as it's data is used by DIFFERENT coroutines.
This commit is contained in:
parent
542b678531
commit
3dd333269e
@ -27,10 +27,14 @@ data class ResponseWaiter(val id: Int) {
|
|||||||
// "send" suspends until another coroutine invokes "receive".
|
// "send" suspends until another coroutine invokes "receive".
|
||||||
//
|
//
|
||||||
// these are wrapped in a try/catch, because cancel will cause exceptions to be thrown (which we DO NOT want)
|
// these are wrapped in a try/catch, because cancel will cause exceptions to be thrown (which we DO NOT want)
|
||||||
|
@Volatile
|
||||||
var channel: Channel<Unit> = Channel(Channel.RENDEZVOUS)
|
var channel: Channel<Unit> = Channel(Channel.RENDEZVOUS)
|
||||||
|
|
||||||
|
@Volatile
|
||||||
var isCancelled = false
|
var isCancelled = false
|
||||||
|
|
||||||
// holds the RMI result or callback. This is ALWAYS accessed from within a lock (so no synchronize/volatile/etc necessary)!
|
// holds the RMI result or callback. This is ALWAYS accessed from within a lock (so no synchronize/volatile/etc necessary)!
|
||||||
|
@Volatile
|
||||||
var result: Any? = null
|
var result: Any? = null
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user