Skip to content

Conversation

@yim-lee
Copy link
Member

@yim-lee yim-lee commented Jun 9, 2022

Resolves #951

Verified that DistributedReception.GuestListing.continuation.onTermination closure gets invoked upon task cancellation, so listing subscription gets cancelled accordingly. Adding a test to make sure no further item is received from the listing.

yim-lee added 2 commits June 9, 2022 16:49
Resolves apple#951 Verified that `DistributedReception.GuestListing.continuation.onTermination` closure gets invoked upon task cancellation, so listing subscription gets cancelled accordingly. Adding a test to make sure no further item is received from the listing.
await call()

// The single timer is done. Remove it so it can be installed again if needed.
self.cancel(for: key)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is called from another thread so we need to lock around all updates of internal var installedTimers: [TimerKey: DistributedActorTimer] = [:] now;

or we could turn this into an actor but since this type needs to go away anyway, let's just do the lock to keep it simple.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

amended f326d38

Copy link
Member

@ktoso ktoso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thank you!

@ktoso ktoso merged commit bfb61da into apple:main Jun 10, 2022
@yim-lee yim-lee deleted the iss951 branch June 10, 2022 01:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants