Closed Bug 1620389 Opened 4 years ago Closed 4 years ago

Convert the thread 'Netlink Monitor' to use the background thread pool

Categories

(Core :: Networking, task, P3)

task

Tracking

()

RESOLVED INVALID

People

(Reporter: KrisWright, Assigned: sonakshisaxena1)

References

(Blocks 1 open bug)

Details

(Whiteboard: [necko-triaged])

Attachments

(1 obsolete file)

The thread Netlink Monitor [1] uses the NS_NewNamedThread method, so it might be possible to move it to the background thread pool.

In an effort to reduce the number of ad-hoc threads in the browser, we want to convert instances of NS_NewNamedThread to use the background thread pool [2] wherever possible. If your thread may block, you can also include the NS_DISPATCH_EVENT_MAY_BLOCK flag.

[1] https://searchfox.org/mozilla-central/rev/c79c0d65a183d9d38676855f455a5c6a7f7dadd3/netwerk/system/netlink/NetlinkService.cpp#1241
[2] https://searchfox.org/mozilla-central/rev/91f6c02fcf4c16f78fdc4417f61f192688294066/xpcom/threads/nsThreadUtils.h#1730-1757

Priority: -- → P3
Whiteboard: [necko-triaged]

Hey Kris!
This is my first time working on something related to threads, so would be glad if you could review and help me rectify my mistakes, if any, in the patch. Thanks :)(In reply to Kris Wright :KrisWright from comment #0)

The thread Netlink Monitor [1] uses the NS_NewNamedThread method, so it might be possible to move it to the background thread pool.

In an effort to reduce the number of ad-hoc threads in the browser, we want to convert instances of NS_NewNamedThread to use the background thread pool [2] wherever possible. If your thread may block, you can also include the NS_DISPATCH_EVENT_MAY_BLOCK flag.

[1] https://searchfox.org/mozilla-central/rev/c79c0d65a183d9d38676855f455a5c6a7f7dadd3/netwerk/system/netlink/NetlinkService.cpp#1241
[2] https://searchfox.org/mozilla-central/rev/91f6c02fcf4c16f78fdc4417f61f192688294066/xpcom/threads/nsThreadUtils.h#1730-1757

Assignee: nobody → sonakshisaxena1
Status: NEW → ASSIGNED
Attachment #9136551 - Attachment is obsolete: true

This particular thread does not need to be moved to the background pool, per the comments on Attachment #9136551 [details]. Closing this bug as invalid.

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: