Doug Thayer
9f70804193
Bug 1602646 - Remove vestigial references to cooperative scheduling r=froydnj
...
GetCurrentPhysicalThread and GetCurrentVirtualThread are, in practice,
identical, as the TLS override that GetCurrentVirtualThread depends on
is never actually set. This simply removes that and renames some things/
deletes some comments.
Rebased across https://hg.mozilla.org/mozilla-central/rev/3f0b4e206853
by Karl Tomlinson <[email protected] >.
Differential Revision: https://phabricator.services.mozilla.com/D41247
2019-12-12 00:56:53 +00:00
Kristen Wright
765b6e862e
Bug 1602167 - Make TaskQueue capable of retaining its dispatch flags r=froydnj
...
Makes TaskQueue's queue hold a struct with each runnable and its flags. When specified, flags will be stored and passed with NS_DISPATCH_AT_END when TaskQueue::Runner dispatches itself back to its event target.
Differential Revision: https://phabricator.services.mozilla.com/D56802
2019-12-11 22:26:06 +00:00
Sylvestre Ledru
0f8c6db00f
Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
...
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D54686
2019-11-26 14:35:02 +00:00
Nathan Froyd
c1c35fee9e
Bug 1593802 - don't drop dispatch flags in TaskQueue's EventTargetWrapper; r=erahm
...
`TaskQueue` wraps an `nsIEventTarget` to provide "one runnable at a
time" execution policies regardless of the underlying implementation of
the wrapped `nsIEventTarget` (e.g. a thread pool). `TaskQueue` also
provides a `nsISerialEventTarget` wrapper, `EventTargetWrapper`, around
itself (!) for consumers who want to continue to provide a more
XPCOM-ish API.
One would think that dispatching tasks to `EventTargetWrapper` with a
given set of flags would pass that set of flags through, unchanged, to
the underlying event target of the wrapped `TaskQueue`.
This pass-through is not the case. `TaskQueue` supports a "tail
dispatch" mode of operation that is somewhat underdocumented. Roughly,
tail dispatch to a `TaskQueue` says (with several other conditions) that
dispatched tasks are held separately and not passed through to the
underlying event target. If a given `TaskQueue` supports tail dispatch
and the dispatcher also supports tail dispatch, any tasks dispatched to
said `TaskQueue` are silently converted to tail dispatched tasks. Since
tail dispatched tasks can't meaningfully have flags associated with
them, the current implementation simply drops any passed flags on the floor.
These flags, however, might be meaningful, and we should attempt to
honor them in the cases we're not doing tail dispatch. (And when we are
doing tail dispatch, we can verify that the requested flags are not
asking for peculiar things.)
Differential Revision: https://phabricator.services.mozilla.com/D51702
2019-11-05 16:59:30 +00:00
Mihai Alexandru Michis
e72165184d
Backed out 2 changesets (bug 1510226) for causing xpcshell crashes and xpcshell failures in test_TelemetrySession.js CLOSED TREE
...
Backed out changeset cb739de6606d (bug 1510226)
Backed out changeset b6f670610dc3 (bug 1510226)
2019-09-25 04:25:07 +03:00
Doug Thayer
47a81ab823
Bug 1510226 - Remove vestigial references to cooperative scheduling r=froydnj
...
GetCurrentPhysicalThread and GetCurrentVirtualThread are, in practice,
identical, as the TLS override that GetCurrentVirtualThread depends on
is never actually set. This simply removes that and renames some things/
deletes some comments.
Differential Revision: https://phabricator.services.mozilla.com/D41247
2019-08-20 18:03:11 +00:00
Sylvestre Ledru
e5a134f73a
Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
...
# ignore-this-changeset
2018-11-30 11:46:48 +01:00
Jean-Yves Avenard
0381eeb324
Bug 1505910 - P2. Remove use of AsTaskQueue(). r=cpearce
...
Make IsCurrentThreadIn() const.
Depends on D11491
Differential Revision: https://phabricator.services.mozilla.com/D11492
2018-11-12 01:09:03 +00:00
Jean-Yves Avenard
8fb815e0c4
Bug 1409664 - P8. Make explicit shutdown of TaskQueue optional. r=gerald
...
Summary:
With this change TaskQueue no longer requires an explicit call to BeginShutdown(). The taskqueue will automatically shutdown once it's now longer referenced.
Depends on D1620
Tags: #secure-revision
Bug #: 1409664
Differential Revision: https://phabricator.services.mozilla.com/D1621
2018-07-03 11:45:18 -07:00
Jean-Yves Avenard
96aa479662
Bug 1409664 - P7. Remove unused TaskQueue method. r=gerald
...
Summary:
Depends on D1619
Tags: #secure-revision
Bug #: 1409664
Differential Revision: https://phabricator.services.mozilla.com/D1620
2018-07-03 11:45:18 -07:00
Emilio Cobos Álvarez
4b8b5e1717
Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
...
This was done automatically replacing:
s/mozilla::Move/std::move/
s/ Move(/ std::move(/
s/(Move(/(std::move(/
Removing the 'using mozilla::Move;' lines.
And then with a few manual fixups, see the bug for the split series..
MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Andrea Marchesini
02b9ae8ca6
Bug 1416724 - part 1 - AbstractThread::Dispatch should propage errors if failing the dispatching of Runnables, r=jwwang
2017-11-15 07:58:02 +01:00
shindli
ec27542442
Backed out 4 changesets (bug 1416724) for failing /builds/worker/workspace/build/src/dom/media/hls/HLSDemuxer.cpp:89:5 r=backout on a CLOSED TREE
...
Backed out changeset 45352aa4319d (bug 1416724)
Backed out changeset 01d1e5263bcd (bug 1416724)
Backed out changeset bc854c315ec8 (bug 1416724)
Backed out changeset 35a50167485d (bug 1416724)
2017-11-15 09:49:04 +02:00
Andrea Marchesini
1ce9be17f1
Bug 1416724 - part 1 - AbstractThread::Dispatch should propage errors if failing the dispatching of Runnables, r=jwwang
2017-11-15 07:58:02 +01:00
Sylvestre Ledru
8fe7a90fcf
Bug 1387002 - Replace .size() by .empty() when applicable in xpcom/ r=froydnj
...
MozReview-Commit-ID: LWzpVGVV7Py
2017-08-03 12:08:32 +02:00
Bill McCloskey
299232f976
Bug 1366072 - Make AbstractThread inherit from nsISerialEventTarget (r=jwwang)
...
MozReview-Commit-ID: 5L3gUEyGfyL
2017-06-13 14:50:58 -07:00
Bill McCloskey
b9ea10b472
Bug 1365102 - Convert NS_GetCurrentThread uses in xpcom/ (r=froydnj)
...
MozReview-Commit-ID: 69qVzf8QJMq
2017-06-12 20:21:43 -07:00
Bill McCloskey
1ec9f35fbb
Bug 1361164 - Add nsISerialEventTarget (r=froydnj)
...
MozReview-Commit-ID: 8y1GdEGCPSB
2017-06-12 20:20:08 -07:00
Bill McCloskey
04b1343a42
Bug 1361164 - Add infallible IsOnCurrentThread to nsIEventTarget (r=froydnj)
...
MozReview-Commit-ID: 12bk9hQ7Wnv
2017-06-12 20:20:08 -07:00
JW Wang
90a0fb1db0
Bug 1359309. P1 - give mozilla::TaskQueue a name which will be useful in debugging Dispatch() failures. r=jya
...
MozReview-Commit-ID: 5FAVNo32fl7
2017-04-25 14:57:55 +08:00
JW Wang
057482d7a6
Bug 1225731 - Early bailout from TaskQueue::DispatchLocked(). r=froydnj
...
MozReview-Commit-ID: Xhj87WeRID
2016-11-10 15:45:45 +08:00
JW Wang
f1fc04c7e2
Bug 1316529. Part 2 - remove TaskQueue::DispatchMode. r=froydnj
...
MozReview-Commit-ID: 5F2OHCpxx7K
2016-11-10 15:34:35 +08:00
JW Wang
e68ef41435
Bug 1316529. Part 1 - Remove TaskQueue::mIsFlushing. r=froydnj
...
MozReview-Commit-ID: 3x4OO7B2htB
2016-11-10 15:28:48 +08:00
Matt Woodrow
55ea19a6f9
Bug 1288618 - Part 6: Avoid unnecessarily allocating a TailDispatcher for XPCOMThreadWrapper. r=bholley
2016-09-21 21:24:43 +12:00
Carsten "Tomcat" Book
e2adb4a537
Backed out 16 changesets (bug 1288618) for bustage on a CLOSED TREE
...
Backed out changeset 06187d250f7a (bug 1288618)
Backed out changeset 2a47f8ea1d89 (bug 1288618)
Backed out changeset e179c8e8265d (bug 1288618)
Backed out changeset 25396a1af922 (bug 1288618)
Backed out changeset e98f835c6ee5 (bug 1288618)
Backed out changeset 24df0e89b273 (bug 1288618)
Backed out changeset f8bbdabdb6da (bug 1288618)
Backed out changeset 8b0adeab93df (bug 1288618)
Backed out changeset 95f23366de82 (bug 1288618)
Backed out changeset 63a9c689e1d5 (bug 1288618)
Backed out changeset 8f67443dccb8 (bug 1288618)
Backed out changeset 4e7fe69d5f45 (bug 1288618)
Backed out changeset 53b113acee42 (bug 1288618)
Backed out changeset 2583ae4e2e3b (bug 1288618)
Backed out changeset 75a61d0e71b7 (bug 1288618)
Backed out changeset da740b4fd484 (bug 1288618)
2016-09-21 08:44:11 +02:00
Matt Woodrow
43a74448eb
Bug 1288618 - Part 6: Avoid unnecessarily allocating a TailDispatcher for XPCOMThreadWrapper. r=bholley
2016-09-21 15:36:09 +12:00
Carsten "Tomcat" Book
e234f2956d
Backed out changeset fdee8d1538b0 (bug 1288618)
2016-09-15 16:34:10 +02:00
Matt Woodrow
21f3d511d0
Bug 1288618 - Part 6: Avoid unnecessarily allocating a TailDispatcher for XPCOMThreadWrapper. r=bholley
2016-09-15 23:17:59 +12:00
Ben Kelly
a4687876e8
Bug 1300118 P5 Expose the TaskQueue backlog ImpreciseLengthForHeuristics(). r=bholley
2016-09-13 20:12:15 -07:00
Ben Kelly
7a13c3819c
Bug 1300118 P3 Fix TaskQueue sCurrentThread TLS handling for nsIEventTarget targets. r=jwwang
2016-09-13 20:12:15 -07:00
Ben Kelly
9f6333f5c6
Bug 1300118 P2 Make TaskQueue implement nsIEventTarget. r=bholley
2016-09-13 20:12:15 -07:00
Ben Kelly
ff84f2253e
Bug 1300118 P1 Make TaskQueue deliver runnables to nsIEventTarget. r=bholley
2016-09-13 20:12:15 -07:00
Ben Kelly
a63344ac8f
Bug 1300118 P0 Rename NS_DISPATCH_TAIL to NS_DISPATCH_AT_END to avoid confusion with AbstractThread::TailDispatch. r=bholley
2016-09-13 20:12:15 -07:00
Wes Kocher
38957ba9d1
Backed out 6 changesets (bug 1300118) for frequent Windows VM Xpcshell failures a=backout CLOSED TREE
...
Backed out changeset 24f714ad248c (bug 1300118)
Backed out changeset 6fe61ed092e8 (bug 1300118)
Backed out changeset dd18e29b64bf (bug 1300118)
Backed out changeset 50882fb40551 (bug 1300118)
Backed out changeset 60e82c1780e5 (bug 1300118)
Backed out changeset e40df52925d5 (bug 1300118)
2016-09-12 16:34:41 -07:00
Ben Kelly
76d8f47506
Bug 1300118 P5 Expose the TaskQueue backlog ImpreciseLengthForHeuristics(). r=bholley
2016-09-12 12:32:21 -07:00
Ben Kelly
ceb22045bf
Bug 1300118 P3 Fix TaskQueue sCurrentThread TLS handling for nsIEventTarget targets. r=jwwang
2016-09-12 12:32:21 -07:00
Ben Kelly
8f7cbca16f
Bug 1300118 P2 Make TaskQueue implement nsIEventTarget. r=bholley
2016-09-12 12:32:20 -07:00
Ben Kelly
3d3a4c9c93
Bug 1300118 P1 Make TaskQueue deliver runnables to nsIEventTarget. r=bholley
2016-09-12 12:32:20 -07:00
Ben Kelly
948492dc89
Bug 1300118 P0 Rename NS_DISPATCH_TAIL to NS_DISPATCH_AT_END to avoid confusion with AbstractThread::TailDispatch. r=bholley
2016-09-12 12:32:20 -07:00
Ben Kelly
449d185850
Backout rev 5c7368370ff9 to 980659720b86 (bug 1300118 and bug 1300658) for incorrect bug number in commit message. r=me
2016-09-12 12:29:17 -07:00
Ben Kelly
f9c073071e
Bug 1300118 P5 Expose the TaskQueue backlog ImpreciseLengthForHeuristics(). r=bholley
2016-09-12 11:21:01 -07:00
Ben Kelly
2063e2c469
Bug 1300118 P3 Fix TaskQueue sCurrentThread TLS handling for nsIEventTarget targets. r=jwwang
2016-09-12 11:21:01 -07:00
Ben Kelly
aeab0a6f2f
Bug 130118 P2 Make TaskQueue implement nsIEventTarget. r=bholley
2016-09-12 11:21:01 -07:00
Ben Kelly
6db37b4b2d
Bug 1300118 P1 Make TaskQueue deliver runnables to nsIEventTarget. r=bholley
2016-09-12 11:21:01 -07:00
Ben Kelly
58e677435a
Bug 1300118 P0 Rename NS_DISPATCH_TAIL to NS_DISPATCH_AT_END to avoid confusion with AbstractThread::TailDispatch. r=bholley
2016-09-12 11:21:01 -07:00
Randell Jesup
fd95dddf42
Bug 1213050: clean up TaskQueue before dropping references to it r=cpearce
...
Also adds assertion TaskQueue isn't trying to kill itself
MozReview-Commit-ID: 1AVuYcfnBBA
2016-05-12 00:53:19 -04:00
JW Wang
3999ed844f
Bug 1257063 - Don't destruct the runnable inside the lock when TaskQueue::Dispatch fails. r=bobbyholley.
...
MozReview-Commit-ID: I5KvfHnLUIS
2016-03-18 11:27:15 +08:00
Robert O'Callahan
8d6e6b87f3
Bug 1236789. Avoid creating an unnecessary thread pool thread for tail-dispatch in TaskQueue. r=bholley
...
MozReview-Commit-ID: H1rhQPBU00L
2016-01-05 16:35:17 +13:00
L. David Baron
de10d1c905
Back out changeset b5ec7338bddf (bug 1236789) on a CLOSED TREE for causing assertions on most (but not all) debug test runs.
2016-02-24 15:45:40 -08:00
Robert O'Callahan
354eb7575c
Bug 1236789. Avoid creating an unnecessary thread pool thread for tail-dispatch in TaskQueue. r=bholley
...
MozReview-Commit-ID: H1rhQPBU00L
2016-01-05 16:35:17 +13:00