Opened 4 years ago

Closed 3 years ago

#4794 closed defect (fixed)

adblock engine creating/releasing concurrency

Reported by: asmirnov Assignee: asmirnov
Priority: P2 Milestone:
Module: Libadblockplus-Android Keywords:
Cc: diegocarloslima, fhd Blocked By:
Blocking: Platform: Android
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):



Adblock engine can be created asynchronously in order not to block main UI: retain(true):

Later we need to make sure creating is finished before getting instance reference: waitForReady():

In the very rare cases the thread can created but not started ( when checking for ready as engineCreated instance is still null. So in waitForReady() we will get exception:

How to reproduce

  1. Create adblock engine async with retain(true)
  2. Invoke waitForReady() immediately

Observed behaviour

Getting runtime exception

Expected behaviour

it should wait for the thread to start and block until the instance is created

Change History (5)

comment:1 Changed 4 years ago by asmirnov

comment:2 Changed 4 years ago by asmirnov

  • Summary changed from adblock engine creating concurrency to adblock engine creating/releasing concurrency

comment:3 Changed 4 years ago by asmirnov

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

comment:4 Changed 3 years ago by abpbot

A commit referencing this issue has landed:
Issue 4794 - adblock engine creating/releasing concurrency

comment:5 Changed 3 years ago by asmirnov

  • Resolution set to fixed
  • Status changed from reviewing to closed
Note: See TracTickets for help on using tickets.