Skip to content
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

feat: Allow coroutine lifecycles + support thisArg + remove engine requirement #2965

Merged
merged 8 commits into from
Mar 13, 2024

Conversation

eonarheim
Copy link
Member

@eonarheim eonarheim commented Mar 13, 2024

===:clipboard: PR Checklist :clipboard:===

  • 📌 issue exists in github for these changes
  • 🔬 existing tests still pass
  • 🙈 code conforms to the style guide
  • 📐 new tests written and passing / old tests updated with new scenario(s)
  • 📄 changelog entry added (or not needed)

==================

This PR adds an optional ex.coroutine timing parameter as an option bag to schedule when they are updated

const result = ex.coroutine(engine, function * () {...}, { timing: 'postupdate' })

This PR also adds a way to set the this parameter for a generator

const result = ex.coroutine({myThis: 'value'}, engine, function * () {...})

Additionally this PR removes the requirement to pass engine if done so under an Excalibur lifecycle

  const result = ex.coroutine(function * () {...});

@github-actions github-actions bot added the enhancement Label applied to enhancements or improvements to existing features label Mar 13, 2024
Copy link

cloudflare-workers-and-pages bot commented Mar 13, 2024

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: c5045d1
Status: ✅  Deploy successful!
Preview URL: https://876a1ed9.excaliburjs.pages.dev
Branch Preview URL: https://feat-update-coroutine-schedu.excaliburjs.pages.dev

View logs

@eonarheim eonarheim changed the title feat: Allow coroutine scheduling during various lifecycles feat: Allow coroutine lifecycles + support thisArg + remove engine requirement Mar 13, 2024
@eonarheim eonarheim merged commit faa4a37 into main Mar 13, 2024
5 of 6 checks passed
@eonarheim eonarheim deleted the feat/update-coroutine-scheduling branch March 13, 2024 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Label applied to enhancements or improvements to existing features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants