Opened on 04/25/2017 at 10:34:34 AM
Closed on 03/13/2018 at 01:23:58 PM
#5180 closed change (fixed)
Make interface of WebRequest asynchronous
Reported by: | sergz | Assignee: | |
---|---|---|---|
Priority: | P2 | Milestone: | |
Module: | Libadblockplus | Keywords: | |
Cc: | fhd | Blocked By: | #5179 |
Blocking: | Platform: | Unknown / Cross platform | |
Ready: | no | Confidential: | no |
Tester: | Unknown | Verified working: | no |
Review URL(s): |
https://codereview.adblockplus.org/29428624/ |
Description (last modified by sergz)
Background
It would be useful to provide users of libadblockplus with possibility to use their own scheduler for asynchronous operations. It's useful because, e.g. on MS Windows only one worker thread is enough to support all our asynchronous operations. In order to do it we should make the methods of injected interface of WebRequest asynchronous. All asynchronous operations should be cancelled when the implementation is destroyed (in particular by JsEngine).
In addition it fixes #3595 by design.
What to change
- Add interface of WebRequest with asynchronous methods.
- For default implementation use asynchronous executor from #5179 and allow to inject current synchronous implementation to the default async implementation. The latter will allow users of libadblockplus to continue to use their current implementation.
- make corresponding changes in JsEngine and tests. To simplify the transition, we may somehow support for a short time JsEngine::SetWebRequest accepting synchronous implementation if it makes sense.
Attachments (0)
Change History (12)
comment:1 Changed on 04/25/2017 at 10:35:55 AM by sergz
- Blocked By 5182 added
comment:3 Changed on 05/02/2017 at 01:29:19 PM by sergz
- Blocked By 5182 removed
comment:5 Changed on 05/08/2017 at 11:05:18 AM by abpbot
comment:7 Changed on 05/11/2017 at 09:49:34 AM by abpbot
A commit referencing this issue has landed:
Issue 5180 - start to inject implementation of WebRequest into JsEngine::ctr
comment:8 Changed on 07/25/2017 at 02:15:52 PM by sergz
- Owner set to sergz
In order to simplify #5450 it makes sense to remove legacy WebRequest interface.
comment:10 Changed on 07/26/2017 at 01:11:53 PM by abpbot
A commit referencing this issue has landed:
Issue 5180 - remove synchronous WebRequest interface and stop exposing of DefaultWebRequest
comment:11 Changed on 07/31/2017 at 02:56:03 PM by sergz
- Owner sergz deleted
Basically this issue can be considered as finished because currently a user can already provide with the proper implementation, however the default implementation is still using detached threads, that's blocked by #5179. Current implementation accepts a scheduler function which after #5179 should use the scheduler.
comment:12 Changed on 03/13/2018 at 01:23:58 PM by sergz
- Resolution set to fixed
- Status changed from new to closed
Some commits referencing this issue have landed: