Closed Bug 1766844 Opened 3 years ago Closed 3 years ago

Avoid unnecessary notify_one calls in internal thread pool

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

RESOLVED FIXED
101 Branch
Tracking Status
firefox101 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

Details

Attachments

(1 file)

This will make our condition variable behave more like it did before the XPCOM thread pool refactoring last year and might be a good workaround for the glibc bug in bug 1765970.

I can't repro the test timeout issue locally or in CI with this change so it's worth a try.

Don't call notify_one if we just finished a task on a helper thread, because we can
simply run the next task on this same thread.

This way we use the condition variable more like we did before the thread pool
refactoring, so it might help us work around the glibc bug in bug 1765970.

Pushed by jdemooij@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/aa9873b86291 Avoid unnecessary notify_one calls in internal thread pool. r=jonco
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 101 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: