Closed
Bug 1361561
Opened 5 years ago
Closed 5 years ago
Add GetCurrentVirtualThread and GetCurrentPhysicalThread
Categories
(Core :: XPCOM, enhancement)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: billm, Assigned: billm)
Details
Attachments
(1 file)
3.56 KB,
patch
|
froydnj
:
review+
|
Details | Diff | Splinter Review |
This change adds some functions that should be used instead of PR_GetCurrentThread. They both return a PRThread. GetCurrentPhysicalThread does exactly the same thing as PR_GetCurrentThread, but it makes it clearer what you're getting when there are cooperatively scheduled threads running. GetCurrentVirtualThread returns the same value for all threads in a cooperative thread pool. The actual value it returns is somewhat immaterial. I kinda wonder if we should just make a new opaque type for it? Maybe a class with a single PRThread* field that would be passed around by value? Anyway, the implementation of these two methods just calls PR_GetCurrentThread() for now. We can fix it up later to do whatever we need.
Attachment #8863939 -
Flags: review?(nfroyd)
![]() |
||
Comment 1•5 years ago
|
||
Comment on attachment 8863939 [details] [diff] [review] patch Review of attachment 8863939 [details] [diff] [review]: ----------------------------------------------------------------- This works for me, thanks! ++ for the comments as well.
Attachment #8863939 -
Flags: review?(nfroyd) → review+
Pushed by wmccloskey@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/d289923632be Add GetCurrentVirtualThread function (r=froydnj)
Comment 3•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/d289923632be
Status: NEW → RESOLVED
Closed: 5 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in
before you can comment on or make changes to this bug.
Description
•