Skip to content
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

docs: add section about usage in sync execution #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pieh
Copy link

@pieh pieh commented Jan 23, 2022

Writing docs is hard, but I did want to follow up on our chat in "GC behaviour in sync execution" issue and do my best

I did want to code snippet to be abstract, but reading it now make it look weird (especially in context of "just" weak-lru-cache, as what I did somewhat approximate its usage with lmdb-js especially with setting the cache if there was cache miss)

Rendered version https://github.com/pieh/weak-lru-cache/blob/docs/sync-execution/README.md#usage-in-synchronous-execution

I did "Allow edits by maintainers" in case you want to make changes directly and avoid back and forth, but we can do back and forth too :)

Closes #4

@kriszyp
Copy link
Owner

kriszyp commented Jan 24, 2022

Thank you for the PR! I haven't merged it yet just because I assume we will probably update this once we figure out if clearKeptObjects() + FinalizationRegistry.cleanupSome() will work (and perhaps refer to using that).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GC behaviour in sync execution
2 participants