Closed Bug 1324894 Opened 3 years ago Closed 3 years ago

remove the PR_Interrupt call in BackgroundHangMonitor

Categories

(Core :: XPCOM, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla53
Tracking Status
firefox53 --- fixed

People

(Reporter: froydnj, Assigned: froydnj)

Details

Attachments

(1 file)

This call makes BackgroundHangMonitor depend on internal implementation details of PRThread and NSPR's synchronization code in ways that I'd really rather not.  Having this call makes it difficult to get rid of using NSPR's synchronization primitives.

How strongly do you feel about a lock being taken here?

http://dxr.mozilla.org/mozilla-central/source/xpcom/threads/BackgroundHangMonitor.cpp#100
Flags: needinfo?(nchen)
We already take mLock when Wakeup() is called, so this could be as simple as changing PR_Interrupt to lock.Notify(), and shouldn't make that big of a difference.
Flags: needinfo?(nchen)
(In reply to Jim Chen [:jchen] [:darchons] from comment #1)
> We already take mLock when Wakeup() is called, so this could be as simple as
> changing PR_Interrupt to lock.Notify(), and shouldn't make that big of a
> difference.

Oh my, we do, don't we?  Sheesh.  Well, forget that, we'll just use the ordinary mechanism here.
Assignee: nobody → nfroyd
Priority: -- → P3
Using PR_Interrupt here makes life difficult for other things, such as
moving away from NSPR synchronization primitives.
Attachment #8825084 - Flags: review?(nchen)
Attachment #8825084 - Flags: review?(nchen) → review+
Pushed by nfroyd@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/5f42a80cee03
use standard Monitor APIs rather than PR_Interrupt in BackgroundHangMonitor; r=darchons
https://hg.mozilla.org/mozilla-central/rev/5f42a80cee03
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
You need to log in before you can comment on or make changes to this bug.