Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upSupport processing network response body notifications on background threads #16304
Labels
Comments
|
@jdm Does the buffer even needs to be threadsafe? Can't we just send it to main thread once all the data has been accumulated? |
|
That's a good point! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a feature that Gecko supports - for responses where nothing useful can be done until the full response body is present, there's no reason to queue an event in the main thread that just pushes data to a buffer. If the buffer is threadsafe, that pushing can happen in a background thread while the main thread works on more important things. We should make it easy to opt-in to this optimization.