Resending this as a new message because of my apparently broken
WYSIWYDG (what you see is what you don't get) email client... :-(
Hopefully this doesn't itself get corrupted...
> My original email featured a use case, although I had to rewrite it to use
> explicit garbage collection. I need a
On Mon, Sep 7, 2015 at 10:19 AM, Isiah Meadows
wrote:
> Resending this as a new message because of my apparently broken
> WYSIWYDG (what you see is what you don't get) email client... :-(
>
> Hopefully this doesn't itself get corrupted...
>
> > My original email featured
I also don't get the purpose of this code. What is it trying to achieve?
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
It's replacing the prototype of a stream periodically to point to a new
writable file output stream pointing to a new file, but I want to kill the
interval timer when the object is garbage collected.
Something like this:
1. Create new stream.
2. Point it to a log file.
3. Every tick on a given
function rotateStreamHelper(weakRes, interval, format) {
let timer = setInterval(() => setStream(weakRes.get(), format),
interval);
weakRes.register(() => clearInterval(timer));
}
function rotateStream(interval, format) {
const res = {};
setStream(res, format);
Yes.
On Mon, Sep 7, 2015, 14:30 Mark S. Miller wrote:
> function rotateStreamHelper(weakRes, interval, format) {
> let timer = setInterval(() => setStream(weakRes.get(), format),
> interval);
> weakRes.register(() => clearInterval(timer));
> }
>
6 matches
Mail list logo