Currently HTTP2Mount uses a global lock in HTTP2Mount::Read() which blocks any
other node from working concurrently.
In my application this causes a big problem: I've created another thread to
download data in background that user will need later (prefetching).
Unfortunately when this background thread runs, the main thread will block as
soon as it try doing a simple read() operation.
The proposed patch fixes this by moving the lock into HTTP2Node. The HTTP2Mount
lock still exists, but it is only used to protect structures like slots_. The
other class members are set on initialization and then used only for reading,
except for MainThreadRunner *runner_ which is already thread-safe.
Original issue reported on code.google.com by mfrei...@gmail.com on 6 Jul 2012 at 3:38
Original issue reported on code.google.com by
mfrei...@gmail.com
on 6 Jul 2012 at 3:38Attachments: