-
Notifications
You must be signed in to change notification settings - Fork 3k
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
rxjs/webSocket should support deserializer return Promise #4270
Comments
So the goal of this is to do some additional processing to the raw stream data as it arrives? I think I see the issue, if you have some format that requires you do something asynchronous to deserialize it, you need to do it here, especially if you're multiplexing the socket. 🤔 |
(Sorry it took me so long to find this one, BTW) :( |
Yes 💯 |
just to clarify: would this allow us to offload json parsing onto a web worker and away from the main UI thread? |
@h4de5 you could but that would be pointless. objects are serialised when going between threads even in shared memory buffers. The point of allowing this function to be a promise is that it allows control to the event loop to be given back. Slower but less blocking. @benlesh Is this going to be taken on anytime soon? I have very few options when it comes to the synchronous parsing of javascript. reason for async? Breaking up json parsing. |
Feature Request
rxjs/webSock should support deserializer return Promise
Is your feature request related to a problem? Please describe.
the
deserializer
have to return Promise because i have to resolve Blob, butsocket.onmessage
doesn't supportdeserializer
function to return PromiseThe text was updated successfully, but these errors were encountered: