Skip to content
This repository has been archived by the owner on Jan 1, 2025. It is now read-only.

Avoid canceling selectors with initializeState and GC #1532

Closed

Conversation

drarmstr
Copy link
Contributor

@drarmstr drarmstr commented Jan 8, 2022

Summary:
When the Garbage Collection feature is enabled and initializeState was used in <RecoilRoot> then an extra release of the mapped snapshot for initialization was releasing selectors. This caused any pending async selectors to cancel any resolutions.

Also, properly run atom effect cleanups when initialized in a snapshot that is part of a mapping, such as during initializeState.

Differential Revision: D33487063

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported labels Jan 8, 2022
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D33487063

@drarmstr drarmstr self-assigned this Jan 8, 2022
@drarmstr drarmstr added the bug Something isn't working label Jan 8, 2022
…mental#1532)

Summary:
Pull Request resolved: facebookexperimental#1532

When the Garbage Collection feature is enabled and `initializeState` was used in `<RecoilRoot>` then an extra release of the mapped snapshot for initialization was releasing selectors.  This caused any pending async selectors to cancel any resolutions.

Also, properly run atom effect cleanups when initialized in a snapshot that is part of a mapping, such as during `initializeState`.

Differential Revision: D33487063

fbshipit-source-id: b91b941dbce2c0312a7ac28aeb53c40aa474e436
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D33487063

drarmstr added a commit to drarmstr/Recoil that referenced this pull request Jan 8, 2022
…mental#1532)

Summary:
Pull Request resolved: facebookexperimental#1532

When the Garbage Collection feature is enabled and `initializeState` was used in `<RecoilRoot>` then an extra release of the mapped snapshot for initialization was releasing selectors.  This caused any pending async selectors to cancel any resolutions.

Also, properly run atom effect cleanups when initialized in a snapshot that is part of a mapping, such as during `initializeState`.

Differential Revision: D33487063

fbshipit-source-id: 21d76d19f3a63e59102a9bd704a1f8ead1aaa875
drarmstr added a commit to drarmstr/Recoil that referenced this pull request Jan 8, 2022
…mental#1532)

Summary:
Pull Request resolved: facebookexperimental#1532

When the Garbage Collection feature is enabled and `initializeState` was used in `<RecoilRoot>` then an extra release of the mapped snapshot for initialization was releasing selectors.  This caused any pending async selectors to cancel any resolutions.

Also, properly run atom effect cleanups when initialized in a snapshot that is part of a mapping, such as during `initializeState`.

Differential Revision: D33487063

fbshipit-source-id: 6a1b9de6dbfc1bd78e53ddc5a22c28097cf34e3d
drarmstr added a commit to drarmstr/Recoil that referenced this pull request Jan 8, 2022
…mental#1532)

Summary:
Pull Request resolved: facebookexperimental#1532

When the Garbage Collection feature is enabled and `initializeState` was used in `<RecoilRoot>` then an extra release of the mapped snapshot for initialization was releasing selectors.  This caused any pending async selectors to cancel any resolutions.

Also, properly run atom effect cleanups when initialized in a snapshot that is part of a mapping, such as during `initializeState`.

Differential Revision: D33487063

fbshipit-source-id: 31efa11e1d8de28fc8fabafb27f7dbeb70b4c39e
drarmstr added a commit to drarmstr/Recoil that referenced this pull request Jan 8, 2022
…mental#1532)

Summary:
Pull Request resolved: facebookexperimental#1532

When the Garbage Collection feature is enabled and `initializeState` was used in `<RecoilRoot>` then an extra release of the mapped snapshot for initialization was releasing selectors.  This caused any pending async selectors to cancel any resolutions.

Also, properly run atom effect cleanups when initialized in a snapshot that is part of a mapping, such as during `initializeState`.

Differential Revision: D33487063

fbshipit-source-id: ae7408f1781622c13038043a14fa96bbf5e40cd5
drarmstr added a commit to drarmstr/Recoil that referenced this pull request Jan 8, 2022
…mental#1532)

Summary:
Pull Request resolved: facebookexperimental#1532

When the Garbage Collection feature is enabled and `initializeState` was used in `<RecoilRoot>` then an extra release of the mapped snapshot for initialization was releasing selectors.  This caused any pending async selectors to cancel any resolutions.

Also, properly run atom effect cleanups when initialized in a snapshot that is part of a mapping, such as during `initializeState`.

Differential Revision: D33487063

fbshipit-source-id: e539c3244a54ce3218d32e6b5232096a4b1a73ec
drarmstr added a commit to drarmstr/Recoil that referenced this pull request Jan 8, 2022
…mental#1532)

Summary:
Pull Request resolved: facebookexperimental#1532

When the Garbage Collection feature is enabled and `initializeState` was used in `<RecoilRoot>` then an extra release of the mapped snapshot for initialization was releasing selectors.  This caused any pending async selectors to cancel any resolutions.

Also, properly run atom effect cleanups when initialized in a snapshot that is part of a mapping, such as during `initializeState`.

Differential Revision: D33487063

fbshipit-source-id: fe0330f84c0a65fd090d16f36818ccbbc8bbfd3d
drarmstr added a commit to drarmstr/Recoil that referenced this pull request Jan 8, 2022
…mental#1532)

Summary:
Pull Request resolved: facebookexperimental#1532

When the Garbage Collection feature is enabled and `initializeState` was used in `<RecoilRoot>` then an extra release of the mapped snapshot for initialization was releasing selectors.  This caused any pending async selectors to cancel any resolutions.

Also, properly run atom effect cleanups when initialized in a snapshot that is part of a mapping, such as during `initializeState`.

Differential Revision: D33487063

fbshipit-source-id: eccf450a0b8c73c16b9f7a3734a18fde27aea163
drarmstr added a commit to drarmstr/Recoil that referenced this pull request Jan 8, 2022
…mental#1532)

Summary:
Pull Request resolved: facebookexperimental#1532

When the Garbage Collection feature is enabled and `initializeState` was used in `<RecoilRoot>` then an extra release of the mapped snapshot for initialization was releasing selectors.  This caused any pending async selectors to cancel any resolutions.

Also, properly run atom effect cleanups when initialized in a snapshot that is part of a mapping, such as during `initializeState`.

Differential Revision: D33487063

fbshipit-source-id: 81b134838234c052e855a1a5f03e024e12a984d9
@drarmstr drarmstr deleted the export-D33487063 branch January 20, 2022 22:24
AlexGuz23 pushed a commit to AlexGuz23/Recoil that referenced this pull request Nov 3, 2022
Summary:
Pull Request resolved: facebookexperimental/Recoil#1532

When the Garbage Collection feature is enabled and `initializeState` was used in `<RecoilRoot>` then an extra release of the mapped snapshot for initialization was releasing selectors.  This caused any pending async selectors to cancel any resolutions.

Also, properly run atom effect cleanups when initialized in a snapshot that is part of a mapping, such as during `initializeState`.

Reviewed By: habond

Differential Revision: D33487063

fbshipit-source-id: 2701c49e53e6e2bad5f343c5b4ea28d77a6360d9
snipershooter0701 pushed a commit to snipershooter0701/Recoil that referenced this pull request Mar 5, 2023
Summary:
Pull Request resolved: facebookexperimental/Recoil#1532

When the Garbage Collection feature is enabled and `initializeState` was used in `<RecoilRoot>` then an extra release of the mapped snapshot for initialization was releasing selectors.  This caused any pending async selectors to cancel any resolutions.

Also, properly run atom effect cleanups when initialized in a snapshot that is part of a mapping, such as during `initializeState`.

Reviewed By: habond

Differential Revision: D33487063

fbshipit-source-id: 2701c49e53e6e2bad5f343c5b4ea28d77a6360d9
eagle2722 added a commit to eagle2722/Recoil that referenced this pull request Sep 21, 2024
Summary:
Pull Request resolved: facebookexperimental/Recoil#1532

When the Garbage Collection feature is enabled and `initializeState` was used in `<RecoilRoot>` then an extra release of the mapped snapshot for initialization was releasing selectors.  This caused any pending async selectors to cancel any resolutions.

Also, properly run atom effect cleanups when initialized in a snapshot that is part of a mapping, such as during `initializeState`.

Reviewed By: habond

Differential Revision: D33487063

fbshipit-source-id: 2701c49e53e6e2bad5f343c5b4ea28d77a6360d9
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants