You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Proxies may be a cleaner way to handle our threading solution - rather than passing a string name for the function, getting an object that's a proxy with those properties on it would be neat.
Our threading solution also needs some sort of way to handle transferable objects.
Describe the solution you'd like to see
Option 1 (Transferable Wrapper)
This is how threads.js handles this. If you want to transfer an object, you can wrap it in a Transfer() call - this call and how it works should be opaque.
Describe the problem this feature solves
Proxies may be a cleaner way to handle our threading solution - rather than passing a string name for the function, getting an object that's a proxy with those properties on it would be neat.
Our threading solution also needs some sort of way to handle transferable objects.
Describe the solution you'd like to see
Option 1 (Transferable Wrapper)
This is how threads.js handles this. If you want to transfer an object, you can wrap it in a
Transfer()
call - this call and how it works should be opaque.For implementation, this could either be a wrapper that must be unwrapped by the proxy handler, or simply push a value into a local array.
Option 2 (Transferable Argument)
Add a final argument that accepts transferable objects.
Not sure how to differentiate between normal arguments and transfers in this case, though
The text was updated successfully, but these errors were encountered: