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

Allow shared array buffers #243

Open
reillyeon opened this issue Nov 27, 2023 · 0 comments
Open

Allow shared array buffers #243

reillyeon opened this issue Nov 27, 2023 · 0 comments

Comments

@reillyeon
Copy link
Collaborator

As mentioned in #217 it would be safe and useful for methods accepting an BufferSource to instead accept an AllowSharedBufferSource.

The argument for safety is that because the ArrayBuffer is already not transferred it is possible for script to modify its contents before the data is sent to the device, allowing this modification to come from another thread is roughly a no-op. In the Chromium implementation in particular, the buffer contents is immediately copied into an IPC message anyways and so the window of opportunity for modification is quite short.

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