mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-11 13:48:23 +02:00
A new function Classifier::AsyncApplyUpdates() is implemented for async update. Besides, all public Classifier interfaces become "worker thread only" and we remove DBServiceWorker::ApplyUpdatesBackground/Foreground. In DBServiceWorker::FinishUpdate, instead of calling Classifier::ApplyUpdates, we call Classifier::AsyncApplyUpdates and install a callback for notifying the update observer when update is finished. The callback will occur on the caller thread (i.e. worker thread.) As for the shutdown issue, when the main thread is notified to shut down, we at first *synchronously* dispatch an event to the worker thread to shut down the update thread. After getting synchronized with all other threads, we send last two events "CancelUpdate" and "CloseDb" to notify dangling update (i.e. BeginUpdate is called but FinishUpdate isn't) and do cleanup work. MozReview-Commit-ID: DXZvA2eFKlc --HG-- extra : rebase_source : cd2e27a6b679d2c96e769854d1582ed2dcda12bb |
||
|---|---|---|
| .. | ||
| .eslintrc.js | ||
| browser.ini | ||
| browser_bug400731.js | ||
| browser_bug415846.js | ||
| browser_mixedcontent_aboutblocked.js | ||
| browser_whitelisted.js | ||
| empty_file.html | ||
| head.js | ||