Skip to content

Signals are lost in some cases #271

@mehtonen-boox

Description

@mehtonen-boox

I'm not sure if this is a bug, but I found this strange behavior of signals getting lost on some cases.

const pool = kefir.pool();
const prop = pool.toProperty(() => 0);
const later = kefir.later(100, null);

const stream = later
 .flatMapLatest(() => kefir.merge([prop.take(1), pool]))
 .log('stream');

pool.plug(stream.take(1).map(() => 1));

I would expect stream to log with 0 and 1, but only 0 gets logged. Or I'm I misunderstanding this somehow?

To clarify issue a little bit, if I change .flatMapLatest(() => kefir.merge([prop.take(1), pool])) to .flatMapLatest(() => prop) it will log 0 and 1. So it seems pool won't give signals in this case even though it should according to my understanding.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions