Closed Bug 1843119 Opened 2 years ago Closed 2 years ago

Remove SpinEventLoopUntil from WifiMonitor

Categories

(Core :: Networking, task, P2)

task

Tracking

()

RESOLVED FIXED
117 Branch
Tracking Status
firefox117 --- fixed

People

(Reporter: handyman, Assigned: handyman)

References

Details

(Whiteboard: [necko-triaged][necko-priority-review])

Attachments

(1 file)

The old WifiMonitor setup needed to use SpinEventLoopUntil for synchronization with the wifi monitor thread but the new setup doesn't need it. The SpinEventLoopUntil calls currently make sure that the main thread has sent the wifi scan update before it starts the timer for the next scan (when polling wifi scans). This is overkill. The main thread task should run almost immediately. Also, a stalled main thread doesn't imply no-geolocation-change, so we should be running the next scan on time anyway. And there's the fact that SpinEventLoopUntil should be used as a last resort.

Severity: -- → S3
Priority: -- → P2
Whiteboard: [necko-triaged][necko-priority-review]

We were using SpinEventLoopUntil to order the scans and the scan results but this seems to be overkill -- we should expect the main loop to process our tasks ery quickly. In addition, it's probably not desirable to wait before scheduling the next scan because a delay in main thread processing doesn't imply lack of movement so our update is still needed. Finally, we try to avoid SpinEventLoopUntil as much as possible.

See Also: → 1842860
Pushed by daparks@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/bbf3c24cbbc7 Remove SpinEventLoopUntil from nsWifiMonitor r=necko-reviewers,kershaw
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 117 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: