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

Add FinalizationRegistry impl #2

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

Conversation

LanderlYoung
Copy link
Owner

@LanderlYoung LanderlYoung commented Jul 30, 2024

To implement FinalizationRegistry, there are some problems that need to be answered.

  1. We CAN NOT call cleanupCallback during target finalization.
  2. JSContext may be GCed before the target object.

@LanderlYoung LanderlYoung force-pushed the finalizer_registry branch 5 times, most recently from 734b4f4 to 8c745d2 Compare July 31, 2024 08:07
@LanderlYoung LanderlYoung changed the title (wip) add FinalizationRegistry impl (test MR) add FinalizationRegistry impl Jul 31, 2024
@LanderlYoung LanderlYoung force-pushed the finalizer_registry branch 9 times, most recently from b0664aa to c92cff6 Compare August 1, 2024 10:40
quickjs.c Outdated Show resolved Hide resolved
@LanderlYoung LanderlYoung changed the title (test MR) add FinalizationRegistry impl wip (test MR) add FinalizationRegistry impl Aug 1, 2024
@LanderlYoung LanderlYoung force-pushed the finalizer_registry branch 8 times, most recently from eb395b0 to 801dd06 Compare August 1, 2024 13:50
@LanderlYoung LanderlYoung force-pushed the refactor_hash_map branch 2 times, most recently from affbd87 to 8b6bb69 Compare August 6, 2024 10:19
@LanderlYoung LanderlYoung force-pushed the finalizer_registry branch 2 times, most recently from 4391fb1 to 08b4f1e Compare August 6, 2024 11:20
@LanderlYoung LanderlYoung changed the title (wip) Add FinalizationRegistry impl Add FinalizationRegistry impl Aug 6, 2024
@LanderlYoung LanderlYoung force-pushed the refactor_hash_map branch 5 times, most recently from fd54841 to 50ca57c Compare August 12, 2024 11:56
@LanderlYoung LanderlYoung force-pushed the finalizer_registry branch 3 times, most recently from bda6759 to cdee815 Compare August 14, 2024 13:16
@LanderlYoung LanderlYoung changed the base branch from refactor_hash_map to linked_hash_map_for_map August 14, 2024 13:17
@LanderlYoung LanderlYoung force-pushed the linked_hash_map_for_map branch from 54f7248 to a71f94c Compare August 14, 2024 13:20
@LanderlYoung LanderlYoung force-pushed the finalizer_registry branch 3 times, most recently from 7e4388f to 99d2359 Compare August 15, 2024 03:27
@LanderlYoung LanderlYoung force-pushed the linked_hash_map_for_map branch 2 times, most recently from eaa1d68 to 60ff781 Compare August 22, 2024 14:00
@LanderlYoung LanderlYoung force-pushed the finalizer_registry branch 2 times, most recently from ad3b51f to 42b2fd3 Compare August 23, 2024 09:46
@LanderlYoung LanderlYoung force-pushed the linked_hash_map_for_map branch from 60ff781 to 3ec4080 Compare September 12, 2024 03:47
1. cleanupCallback is invked by a job (JS_EnqueueJob)
2. registries are stored in JSContext for manage and perform clanup
   callback
3. ensure related jobs are cancled when JSContext release.
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.

1 participant