Convert the thread 'NamedPipeSrv' to use the background thread pool
Categories
(Core :: Networking, task, P3)
Tracking
()
People
(Reporter: KrisWright, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [necko-triaged])
The thread NamedPipeSrv
[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/socket/nsNamedPipeService.cpp#71
[2] https://searchfox.org/mozilla-central/rev/91f6c02fcf4c16f78fdc4417f61f192688294066/xpcom/threads/nsThreadUtils.h#1730-1757
Updated•5 years ago
|
Comment 1•5 years ago
|
||
(In reply to Kris Wright :KrisWright from comment #0)
The thread
NamedPipeSrv
[1] uses theNS_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 theNS_DISPATCH_EVENT_MAY_BLOCK
flag.[1] https://searchfox.org/mozilla-central/rev/c79c0d65a183d9d38676855f455a5c6a7f7dadd3/netwerk/socket/nsNamedPipeService.cpp#71
[2] https://searchfox.org/mozilla-central/rev/91f6c02fcf4c16f78fdc4417f61f192688294066/xpcom/threads/nsThreadUtils.h#1730-1757
Hey Kris!
I was working on this where I noticed that we have used nsIObservers
and functions related to it. I think they can be handled by the background thread but just wanted to check if I should keep them or not?
Thanks!
Updated•2 years ago
|
Description
•