Opened on 04/25/2017 at 10:37:32 AM

Closed on 03/13/2018 at 01:24:27 PM

#5183 closed defect (fixed)

Make interface of FileSystem asynchronous

Reported by: sergz Assignee:
Priority: P2 Milestone:
Module: Libadblockplus Keywords:
Cc: fhd Blocked By: #5179, #5508
Blocking: Platform: Unknown / Cross platform
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

https://codereview.adblockplus.org/29449592
https://codereview.adblockplus.org/29499574/
https://codereview.adblockplus.org/29499592/
https://codereview.adblockplus.org/29535572/

Description

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 FileSystem 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 FileSystem 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.

Attachments (0)

Change History (13)

comment:1 Changed on 05/25/2017 at 06:28:36 PM by hfiguiere

  • Owner set to hfiguiere

comment:2 Changed on 05/26/2017 at 12:43:36 PM by hfiguiere

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:3 Changed on 07/07/2017 at 01:52:47 PM by abpbot

A commit referencing this issue has landed:
Issue 5183 - Provide async interface for FileSystem

comment:4 Changed on 07/07/2017 at 01:53:58 PM by hfiguiere

  • Status changed from reviewing to reopened

Issue #5179 is still blocking this.

comment:5 Changed on 07/26/2017 at 05:00:13 PM by sergz

  • Owner changed from hfiguiere to sergz

I'm updating tests to get rid of race conditions related to threads in file system implementation, removing synchronous FileSystem interface and moving headers for DefaultFileSystem into src directory.

comment:6 Changed on 07/27/2017 at 09:21:15 AM by sergz

  • Review URL(s) modified (diff)

comment:7 Changed on 07/27/2017 at 12:27:27 PM by abpbot

A commit referencing this issue has landed:
Issue 5183 - don't inherit ThrowingFileSystem from sync FileSystem

comment:8 Changed on 07/27/2017 at 02:56:11 PM by abpbot

comment:9 Changed on 07/31/2017 at 02:55:50 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:10 Changed on 09/04/2017 at 09:10:42 AM by sergz

  • Blocked By 5508 added

comment:11 Changed on 09/04/2017 at 10:00:40 AM by sergz

  • Review URL(s) modified (diff)

comment:12 Changed on 09/05/2017 at 01:56:40 PM by abpbot

A commit referencing this issue has landed:
Issue 5183 - make FileSystemPtr std::unique_ptr

comment:13 Changed on 03/13/2018 at 01:24:27 PM by sergz

  • Resolution set to fixed
  • Status changed from reopened to closed

Add Comment

Modify Ticket

Change Properties
Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none).
 
Note: See TracTickets for help on using tickets.