What happens if A sends B a reference to A? What happens if B sends A a reference to A? What happens if the user tries to release the self reference? Our code doesn't seem to handle these edge cases.
Deliverables
Fix edge cases when:
[ ] An actor creates a ref where it is the target
In this case, the ref should immediately be added to the owners set
[ ] An actor tries to deactivate a ref it has to itself
Actors shouldn't be able to deactivate the very first self ref because that is always accessible fromActorContext.
When an actor deactivates a different ref to itself, it should still send itself a release message because it may have undelivered AppMsgs using that ref.
[ ] In tryTerminate, an actor should check that all of the refs it has to itself have no undelivered messages, instead of just the self ref.
What happens if A sends B a reference to A? What happens if B sends A a reference to A? What happens if the user tries to release the
self
reference? Our code doesn't seem to handle these edge cases.Deliverables
Fix edge cases when:
owners
setself
ref because that is always accessible fromActorContext
.release
message because it may have undeliveredAppMsg
s using that ref.tryTerminate
, an actor should check that all of the refs it has to itself have no undelivered messages, instead of just theself
ref.