concat stream not emitting "end" event
- Lingua principale
- JavaScript
- Stelle
- 3.4k
- Fork
- 145
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
I might be missing something but I'm trying a simple stream concat of 2 streams,
and noticed that while each stream emits the "end" event, the concat result doesn't.
Reproduction Steps:
``` js
var highland = require("highland");
(function() {
s1 = highland(['1', '2', '3']), s2 = highland(['4', '5', '6']), s3 = s1.concat(s2);
const log = s => process.stdout.write(` [${s}] `);
s1.on('end', function() { log('s1 ended') });
s2.on('end', function() { log('s2 ended') });
s3.on('end', function() { log('s3 ended') });
s3.map(n => `[${n}]`).pipe(process.stdout);
})();
```
Outputs:
`[1][2][3] [s1 ended] [4][5][6] [s2 ended] undefined`
Expected:
`[s3 ended]` to print to console too.
ps: I noticed that if I add another transform at the end ( `s4 = s3.map(....); s4.on('end', ...)`), that stream does emit "end".
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Esegui la riproduzione JavaScript dell'issue e confronta gli eventi di fine di s1, s2 e s3, incluso il caso aggiunto di trasformazione map. Traccia il comportamento di completamento dello stream concat; completato significa che il listener diretto di s3 emette "end" dopo che entrambi gli stream di input sono terminati.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript
- Ambito
- backend
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100