-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
No way to pass user data to thread service callback #6957
Labels
Comments
I wouldn't want to break the existing JsCreateRuntime, so to implement this would involve either: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Customarily, callbacks take an additional user data parameter so that closures can be used as callbacks. This is the case with, for example,
JsMemoryAllocationCallback
. However,JsThreadServiceCallback
takes no such parameter (do not confuse this with itscallbackState
parameter, which is not user data rather engine-provided data for the work item callback).Ideally the API would be:
where the runtime would pass
threadServiceCallbackState
tothreadService
whenever it’s called.The text was updated successfully, but these errors were encountered: