Don't shut down DecodePool threads twice

NEW
Unassigned

Status

()

Core
ImageLib
P3
normal
2 years ago
9 months ago

People

(Reporter: seth, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [gfx-noted])

(Reporter)

Description

2 years ago
We shut down all the DecodePool worker threads here:

https://dxr.mozilla.org/mozilla-central/source/image/DecodePool.cpp?q=DecodePool.cpp&redirect_type=direct#292

However, they also shut down themselves here:

https://dxr.mozilla.org/mozilla-central/source/image/DecodePool.cpp?q=DecodePool.cpp&redirect_type=direct#181

Let's pick one method and commit to it. The second approach has the advantage of being asynchronous; with the first approach, we join all the threads synchronously, which means that the main thread is blocking waiting for them to complete their final work items. On the other hand, being asynchronous is not always *actually* advantageous. =p If we're gonna end up tearing our collective hair out over it, we should probably just join the threads synchronously; I'd expect the worst case delay to be in the neighborhood of 10-20ms.

Updated

2 years ago
Whiteboard: [gfx-noted]
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.