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

registerCallback returning Any considered harmful #404

Open
thirtytwobits opened this issue Nov 23, 2024 · 0 comments
Open

registerCallback returning Any considered harmful #404

thirtytwobits opened this issue Nov 23, 2024 · 0 comments

Comments

@thirtytwobits
Copy link
Contributor

In the current design all of the places where we have Any registerCallback(Function&&) inhibit the ability of users to author custom executors and to integrate with various platforms. The primary issue is the method is required to move a node into an opaque container that is then moved into an unknown caller. There is no canonical key available for the implementation of registerCallback to retain. This prohibits filtering callbacks within execution stages based on type and writing event-driven rescheduling of callbacks by platform layers.

We need to modify this design to use a allocation pool instead of Any types so there is only even a single memory location containing a given callback within a process.

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

No branches or pull requests

1 participant