-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Find a way to clean up arrays of subscriptions #36
Labels
enhancement
New feature or improved functionality.
Comments
lawrence-forooghian
added
enhancement
New feature or improved functionality.
bug
Something isn’t working. It’s clear that this does need to be fixed.
and removed
enhancement
New feature or improved functionality.
labels
Sep 3, 2024
lawrence-forooghian
added
enhancement
New feature or improved functionality.
and removed
bug
Something isn’t working. It’s clear that this does need to be fixed.
labels
Oct 10, 2024
This was referenced Nov 11, 2024
This was referenced Nov 18, 2024
lawrence-forooghian
added a commit
that referenced
this issue
Dec 2, 2024
I don’t think that this method should exist at all; the intention for our public API, as described in 20e7f5f, is that the user should not need to explicitly unsubscribe. (We have #36 for figuring out how to implement the appropriate cleanup.) However, this method does now exist, and we’re probably not going to get rid of it before beta, so we agreed in standup today to at least name it in line with JS.
lawrence-forooghian
added a commit
that referenced
this issue
Dec 4, 2024
I don’t think that this method should exist at all; the intention for our public API, as described in 20e7f5f, is that the user should not need to explicitly unsubscribe. (We have #36 for figuring out how to implement the appropriate cleanup.) However, this method does now exist, and we’re probably not going to get rid of it before beta, so we agreed in standup today to at least name it in line with JS.
lawrence-forooghian
added a commit
that referenced
this issue
Jan 8, 2025
Hook in to AsyncStream’s termination notification mechanism, so that when the user discards a subscription or cancels the task in which they’re iterating over a subscription, we: - remove this subscription from our internal data structures - remove any corresponding ably-cocoa listeners that drive this subscription I’m sure that there will turn out to be a bunch of wrong stuff that I’ve done here, due to my still-shaky knowledge of concurrency stuff and AsyncSequence best practices, but it’s a start. Resolves #36.
lawrence-forooghian
added a commit
that referenced
this issue
Jan 8, 2025
Hook in to AsyncStream’s termination notification mechanism, so that when the user discards a subscription or cancels the task in which they’re iterating over a subscription, we: - remove this subscription from our internal data structures - remove any corresponding ably-cocoa listeners that drive this subscription I’m sure that there will turn out to be a bunch of wrong stuff that I’ve done here, due to my still-shaky knowledge of concurrency stuff and AsyncSequence best practices, but it’s a start. Resolves #36.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In #19 the
DefaultRoomStatus
creates an array ofSubscription
objects to which it can emit status updates. We need a way to remove subscriptions from this array once they're no longer needed. In 20e7f5f I said that there might be a way to do this automatically based on some event (I’m being very vague here because I don't know what); let's look into that. Else we might need to introduce the unsubscribe methods from JS.We also need to clean up the underlying ably-cocoa listeners where relevant.
┆Issue is synchronized with this Jira Story by Unito
The text was updated successfully, but these errors were encountered: