dart-lang / dart-lang/language

Finalizer/NativeFinalizer token -> peer ?

Open
#2,147 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TeX
Stars
2.9k
Forks
239
Avg merge
2d 18h
Merged PRs (30d)
14

Description

context: https://github.com/dart-lang/language/blob/master/accepted/future-releases/1847%20-%20FinalizationRegistry/proposal.md

We have given the name "finalization token" or `token` to the value passed to the callback.

"token" is not a very descriptive name, we also call the `detachKey` a "key", but at least it has "detach" in the name. (And [sometimes](https://github.com/dart-lang/sdk/search?q=detachToken) we even call it `detachToken`!)

Should we rename `token` and "finalization token" to `peer` and "peer object" respectively?

cc @lrhn @mraleph

suggested by @mkustermann on https://dart-review.googlesource.com/c/sdk/+/229544/27..31/sdk/lib/_internal/vm/lib/finalizer_patch.dart#b40.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.