Skip to content
Commit 2abf0f24 authored by John Reck's avatar John Reck
Browse files

Fix a race condition that could cause lockup

Bug: 22676664

If a task is queued on a worker thread that is busy
processing a task AND a trim memory signal comes along
prior to the initial task being completed then the
tasks that were queued prior to the exit request will
never be processed.

This is bad, as when those futures are used later on, such
as in trying to delete them from the cache, they will block
waiting for the orphaned task to be finished.

Simple fix is to just never stop the worker threads. Increase
RAM usage slightly as we won't reclaim that stack space, but
this cost is fairly small

Change-Id: I818b011f9bc6ba06942fdad81c27656bd97b42d4
parent b3e40760
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment