Closed
Bug 1178205
Opened 9 years ago
Closed 6 years ago
Make CancellableTimeout shared in a common toolkit module
Categories
(Toolkit :: Telemetry, defect, P4)
Toolkit
Telemetry
Tracking
()
RESOLVED
WONTFIX
Tracking | Status | |
---|---|---|
firefox42 | --- | affected |
People
(Reporter: gfritzsche, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [measurement:client])
TelemetrySend introduces a CancellableTimeout, which allows async code to wait for a promise with a timeout, but still be woken up earlier if needed.
This is potentially useful elsewhere, we should share this in a toolkit module.
Updated•9 years ago
|
Comment 1•9 years ago
|
||
As suggested by Yoric, this should probably go in PromiseUtils.jsm [0].
[0] - http://hg.mozilla.org/mozilla-central/annotate/5fe9ed3edd68/toolkit/modules/PromiseUtils.jsm
Reporter | ||
Updated•9 years ago
|
Priority: -- → P4
Whiteboard: [measurement:client]
Comment 2•9 years ago
|
||
This bug could be potentially mentored, but we need to figure out how to deal with testing first.
We're using our Policy object to set/clear the timeout in [0].
[0] - https://dxr.mozilla.org/mozilla-central/rev/e790bba372f14241addda469a4bdb7ab00786ab3/toolkit/components/telemetry/TelemetrySend.jsm#279
Comment 3•6 years ago
|
||
Since nsITimer supports cancellation and the couple of other places cancellable timers and timeouts have been implemented, do we still want to pursue this?
Flags: needinfo?(alessio.placitelli)
Comment 4•6 years ago
|
||
(In reply to Chris H-C :chutten from comment #3)
> Since nsITimer supports cancellation and the couple of other places
> cancellable timers and timeouts have been implemented, do we still want to
> pursue this?
This is slightly different, as this CancellableTimeout (which is built on timers) resolves the promise when cancelled *and* when timing out.
However, given comment 0, maybe Georg has stronger opinions on this. I personally think it should be ok to just close this as WONTFIX and re-open if needed :)
Flags: needinfo?(alessio.placitelli) → needinfo?(gfritzsche)
Reporter | ||
Comment 5•6 years ago
|
||
What Alessio said.
This was well intended but is not something important to do.
Status: NEW → RESOLVED
Closed: 6 years ago
Flags: needinfo?(gfritzsche)
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•