isValidLink function
Checks if a link is still valid for a subscriber.
Parameters:
checkLink: The link to checksub: The subscriber node
Returns: true if the link is still valid
Implementation
@pragma('vm:prefer-inline')
@pragma('wasm:prefer-inline')
@pragma('dart2js:prefer-inline')
bool isValidLink(Link checkLink, ReactiveNode sub) {
Link? link = sub.depsTail;
while (link != null) {
if (link == checkLink) {
return true;
}
link = link.prevDep;
}
return false;
}