Remove SpinEventLoopUntil from WifiMonitor
Categories
(Core :: Networking, task, P2)
Tracking
()
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.
Assignee | ||
Comment 1•2 years ago
|
||
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.
Assignee | ||
Comment 2•2 years ago
|
||
Comment 4•2 years ago
|
||
bugherder |
Description
•