We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 64d8c03 commit 25da3faCopy full SHA for 25da3fa
src/Class/Functional/index.ts
@@ -157,6 +157,8 @@ export class Functional<
157
}
158
159
160
+ private _signal: Symbol
161
+
162
private _forward_if_ready() {
163
// console.log('Functional', '_forward_if_ready')
164
while (
@@ -174,7 +176,17 @@ export class Functional<
174
176
this._forwarding_empty = false
175
177
178
- this.f(this._i, this._done)
179
+ this._signal = Symbol()
180
181
+ const signal = this._signal
182
183
+ this.f(this._i, (...args) => {
184
+ if (signal !== this._signal) {
185
+ return
186
+ }
187
188
+ this._done(...args)
189
+ })
190
191
192
0 commit comments