Open dumconstantin opened 3 years ago
Producer b is only called once:
b
const a: producer = ({ foo = update.value }) => { const int32 = new Int32Array(2); int32[0] = 42; foo.set(int32); setTimeout(() => { int32[1] = 43; foo.set(int32); }); }; const b: producer = ({ foo = observe.value}) => { console.log("foo is", foo); };
But first setting the value to null and then async setting it to the next array buffer value, the b producer is called twice as it should:
null
const a: producer = ({ foo = update.value }) => { const int32 = new Int32Array(2); int32[0] = 42; foo.set(int32); setTimeout(() => { int32[1] = 43; foo.set(null); setTimeout(() => { foo.set(int32); }) }); };
This has to do with the comparison logic as I've tested with different values in the buffer/different buffers and it still doesn't retrigger on update.
Producer
b
is only called once:But first setting the value to
null
and then async setting it to the next array buffer value, theb
producer is called twice as it should:This has to do with the comparison logic as I've tested with different values in the buffer/different buffers and it still doesn't retrigger on update.