Open
Description
Several days of debugging an issue have finally led me to discovering this:
var Bacon = require('baconjs');
var criticalSectionActive = false;
var someBus = new Bacon.Bus();
someBus.log();
Bacon.later(0, [1,2])
.flatMap(Bacon.fromArray)
.onValue(function(x) {
if (criticalSectionActive) {
console.error("Re-entrance!", x);
}
criticalSectionActive = true;
someBus.end();
criticalSectionActive = false;
console.log('got x', x);
});
Output:
<end>
Re-entrance! 2
got x 2
got x 1
Expected output:
<end>
got x 1
got x 2
Using Bacon 0.7.53
Metadata
Metadata
Assignees
Labels
No labels