New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Race condition in InlineViewStrategy / <compose> #299

Closed
EisenbergEffect opened this Issue Aug 3, 2017 · 0 comments

Comments

Projects
None yet
1 participant
@EisenbergEffect
Member

EisenbergEffect commented Aug 3, 2017

@RomkeVdMeulen commented on Fri Apr 07 2017

  • Browser:
    Chrome 57

Current behavior:
When binding a <compose> to an InlineViewStrategy and replacing the strategy a couple of time in quick succession, the final state may vary. See https://gist.run/?id=786a81fa21a427cd803d1ee1e12681d0

Expected/desired behavior:
Regardless of how long it takes, <compose> should eventually settle on the last state of the InlineViewStrategy.


@RomkeVdMeulen commented on Fri Apr 07 2017

May be related to #538.


@StrahilKazlachev commented on Wed Aug 02 2017

I could not debug the repro locally since it always shows 3 for me. In gistrun though on first run I always get 2. I think the issue is that <compose> does not await the call to CompositionEngine.prototype.compose(in processInstruction) to finish before calling it again. So it all depends on which call will complete last. I'm unsure if not awaiting is intended or not. But you could also get this issue if one of the previous VMs takes longer in its .activate hook than the next ones.
@RomkeVdMeulen I don't think #538 is responsible for this issue, but it could help with its manifestation.
@EisenbergEffect If you are OK with the above explanation could you move the issue to templating-resources? I'll also open a PR.

StrahilKazlachev added a commit to StrahilKazlachev/templating-resources that referenced this issue Aug 26, 2017

fix(compose): await composition/activation
before applying new changes close #299

StrahilKazlachev added a commit to StrahilKazlachev/templating-resources that referenced this issue Aug 28, 2017

fix(compose): await composition/activation
before applying new changes close #299

StrahilKazlachev added a commit to StrahilKazlachev/templating-resources that referenced this issue Aug 28, 2017

fix(compose): await composition/activation
before applying new changes close #299

StrahilKazlachev added a commit to StrahilKazlachev/templating-resources that referenced this issue Sep 17, 2017

fix(compose): await composition/activation
before applying new changes close #299, close #240
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment